ET icon indicating copy to clipboard operation
ET copied to clipboard

Performance.

Open juliolitwin opened this issue 3 years ago • 4 comments

Hello @egametang,

I did some tests with ET to see how it would behave in terms of performance, but I had some problems. First I started with a test to create 100 Robots, when it gets around 30, the server becomes totally unfeasible, with a huge processing slowness. In debug mode, you can see various throw issues.

I performed the following tests:

  • Tested in debug mode on localhost;
  • Tested in debug mode in router mode;
  • Tested in release mode on localhost.

All were slow in the test of 100 robots.

Am I doing something wrong?

Here's an image of the throw that gives in debug mode: https://prnt.sc/38GY4e4_DE8B

Basically I just ran the project, and executed with the command "CreateRobot --Num 100".

juliolitwin avatar Jul 01 '22 15:07 juliolitwin

You may only use single process mode to start the server, and a process contains too many message forwarding, resulting in performance degradation. In addition, only one robot process is used, which will lead to a process equivalent to 100 clients running, and the message of a robot will be broadcast to 100 robots. In this way, if each robot sends a message per second, the server actually sends 100 * 100 = 10000 messages. 10000 messages go through client->gate->map->gate->client, which is very laborious to process. You need to start the server in multiple process mode to test. Single process mode is only used for development

egametang avatar Jul 02 '22 13:07 egametang

Hey @egametang, thanks for answering! :)

Regarding the processes, in the case using multiples, is there any configuration example available? I couldn't find it. I'm trying to run some configuration tests to see if I can get smooth to work, but unfortunately I haven't had any success yet.

Here is an example of the configuration I was trying:

StartProcess: https://prnt.sc/kCpquyRCu3zn

StartScene: https://prnt.sc/NubSUoYZ3NOc

Robot: https://prnt.sc/9E0VJzFOmwu6

Regarding the map specifically, I only kept one, because I didn't test yet if with more processes I would keep the robots synchronized on the same map in different processes.

juliolitwin avatar Jul 02 '22 18:07 juliolitwin

You should configure the scene to different processes. From the second picture, you still configure it in process 1

egametang avatar Jul 03 '22 08:07 egametang

You should configure the scene to different processes. From the second picture, you still configure it in process 1

Thanks. I'm trying to solve it, but apparently I'm having connection problems when I end up changing the Process ID. It would be great if there was a configuration mode with this different type of processes, it would help a lot.

juliolitwin avatar Jul 04 '22 12:07 juliolitwin