Geteventore performance & configuration

Hi,

I have some event upload (200-500 events per seconds) that take too much resource for my geteventore (3.8.1).

Which config must i use & increase to increase the performance of my geteventstore ?

Thx for your reponse.

You havn't said anything at all about what your resources are or other
pertinent information like how many and what types of subscribers you
have / overall read workload.

I host my geteventsotre in dedicated server (16 GoRAM, Xeon processor) embed in a docker container.
I configure 12 WORKERs.
I dont use subscription.

I read geteventstore have good perf on read and write but when i try to read/or write some hundred of stream (200-500 envets/s) together i have several timeout message (i use java Client).

So I think i don’t use good config to use geteventstore with good perf.

The Dockerfile I use :

FROM ubuntu:14.04
MAINTAINER Ugo Bourdon [email protected]

RUN apt-get update && apt-get install -y curl

RUN curl http://download.geteventstore.com/binaries/EventStore-OSS-Ubuntu-14.04-v3.8.1.tar.gz | tar xz -C /opt

EXPOSE 2113
EXPOSE 1113

VOLUME ["/data/db", “/data/logs”]

ENV EVENTSTORE_MAX_MEM_TABLE_SIZE 100000
ENV EVENTSTORE_WORKER_THREADS 12

WORKDIR /opt/EventStore-OSS-Ubuntu-14.04-v3.8.1

ENTRYPOINT ./run-node.sh --int-http-prefixes=http://*:2113/ --ext-ip=0.0.0.0 --db /data/db --log /data/logs --run-projections=all

``

The command i use to run an instance :

docker run -d --name DB_NAME -p XXXX:2113 -p XXXX:1113 --ulimit nofile=65000:65000 -v /path/to/db:/data/db -v /path/to/logs:/data/logs eventstore/geteventstore:3.8.1

``

And the hardware you run on? the networking? Why have you set worker
threads to 12 (up from the default) and memtable size down from the
default of 1m?

200-500 events/second is nothing. Are you using a single blocking
thread writing? Maybe you can post code as it is sometimes easier than
explaining.

I don’t remember why is use this setting (shame on me), I set this settings 2 years ago from 3.0.0 i use at this time.

The complete spec of my hardware : https://documentation.online.net/fr/dedicated-server/offers/2015/server-dedibox-classic-2015

I use Task and Poocess API from scalaz to manage asynchronous and parallel operation.

Here my complete Eventstore repository

package cqrs.commands.infrastructure.eventstore

import cqrs.commands.infrastructure.eventstore.connection.{EventstoreConnection, EventstoreProdConnection}
import eventstore._
import play.api.Logger
import play.api.libs.json.{Format, Json}
import service.utils.future
import service.utils.future.FutureOps

import scalaz.Scalaz.{ToEitherOps, ToIdOps}
import scalaz.{-\/, \/, \/-}
import scalaz.concurrent.Task
import scalaz.stream.{Process, Process0}

trait Eventstore extends EventstoreConnection {
   /**

Also can you try running testclient (testclient or
EventStore.TestClient) when given prompt run "wrfl 10 1000000" and
provide output?

What is testclient ? I don’t find it in the doc.

EventStore.TestClient is part of C# lib ?

Ok i find the exec file testclient

can i add some param to cmd “wrfl 10 1000000” to link it on distant geteventstore server ?

yes it takes command line params like --ip=

In local on my machine, with no specific config i have :

wrfl 10 1000000
[03334,07,23:26:47.773] Processing command: wrfl 10 1000000.
…[03334,32,23:26:58.242]
DONE TOTAL 100000 WRITES IN 00:00:10.4659481 (9554,8/s) [S:100001, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[03334,32,23:27:08.758]
DONE TOTAL 200000 WRITES IN 00:00:10.5166259 (9508,8/s) [S:200000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[03334,08,23:27:20.402]
DONE TOTAL 300000 WRITES IN 00:00:11.6436210 (8588,4/s) [S:300000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].

``

On my docker container :

wrfl 10 1000000
[09639,07,23:31:10.791] Processing command: wrfl 10 1000000.
Segments count: 1, buffers count: 512, should be when full: 512
…[09639,06,23:31:33.731]
DONE TOTAL 100000 WRITES IN 00:00:22.8913981 (4368.5/s) [S:100000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[09639,21,23:31:57.074]
DONE TOTAL 200000 WRITES IN 00:00:23.3431967 (4283.9/s) [S:200000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[09639,23,23:32:21.411]
DONE TOTAL 300000 WRITES IN 00:00:24.3367289 (4109.0/s) [S:300000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[09639,06,23:32:44.744]
DONE TOTAL 400000 WRITES IN 00:00:23.3326554 (4285.8/s) [S:400000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].
…[09639,23,23:33:08.206]
DONE TOTAL 500000 WRITES IN 00:00:23.4623054 (4262.2/s) [S:500000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].

``

So you have +- 4k writes/sec happening on test client.

If i test with latency networks i can mesure near from my real backend.
But i dont understand how to use ‘–ip=’ I use >>> WRFL --ip=my_ip:2113 10 1000000 but say it is not good cmd line

testclient --ip .... there is also testclient --help

When i bind my local testclient to my distant geteventore ans try WRFL i receive error message :

[03583,42,23:53:31.821] Invalid TCP frame received.
Package size is out of bounds: 1347703880 (max: 67108864).
[03583,42,23:53:31.843] FRAMING ERROR! Data:
000000: 48 54 54 50 2F 31 2E 31 20 34 30 30 20 42 61 64 | HTTP/1.1 400 Bad
000016: 20 52 65 71 75 65 73 74 0D 0A 43 6F 6E 74 65 6E | Request…Conten
000032: 74 2D 54 79 70 65 3A 20 74 65 78 74 2F 68 74 6D | t-Type: text/htm
000048: 6C 3B 20 63 68 61 72 73 65 74 3D 75 73 2D 61 73 | l; charset=us-as
000064: 63 69 69 0D 0A 53 65 72 76 65 72 3A 20 4D 6F 6E | cii…Server: Mon
000080: 6F 2D 48 54 54 50 41 50 49 2F 31 2E 30 0D 0A 44 | o-HTTPAPI/1.0…D
000096: 61 74 65 3A 20 54 68 75 2C 20 30 31 20 53 65 70 | ate: Thu, 01 Sep
000112: 20 32 30 31 36 20 32 33 3A 35 33 3A 33 31 20 47 | 2016 23:53:31 G
000128: 4D 54 0D 0A 43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 | MT…Content-Leng
000144: 74 68 3A 20 35 32 0D 0A 43 6F 6E 6E 65 63 74 69 | th: 52…Connecti
000160: 6F 6E 3A 20 63 6C 6F 73 65 0D 0A 0D 0A 3C 68 31 | on: close…<h1
000176: 3E 42 61 64 20 52 65 71 75 65 73 74 20 28 49 6E | >Bad Request (In
000192: 76 61 6C 69 64 20 72 65 71 75 65 73 74 20 6C 69 | valid request li
000208: 6E 65 20 28 70 61 72 74 73 29 2E 29 3C 2F 68 31 | ne (parts).)</h1
000224: 3E | >

[03583,42,23:53:31.843] Invalid TCP frame received.
Package size is out of bounds: 1347703880 (max: 67108864).
[03583,07,23:53:32.396] Error during execution of command: Connection was closed prematurely…
[03583,07,23:53:32.396] Command exited with code 1.

``

Try the tcp port.

I used 2113 http port instead of 1113 TCP port :confused:
So i have this result with distant test :

[03702,07,00:01:17.686] Processing command: WRFL 10 1000000.
…[03702,21,00:08:40.179]
DONE TOTAL 100000 WRITES IN 00:07:22.4699256 (226,0/s) [S:100000, F:0 (WEV:0, P:0, C:0, F:0, D:0)].Saisissez le code ici…

``

But it is done from my home with very bad network and worse for upload.

I’ll try from another server. Thx for the tips. With i can test my config. Thx and good night or morning :smiley: