go version)?go env)?The client reads a text file with commands, sends them to the server and waits for a response.
The client takes measurement on server reply time.
My tests were taken on the same machine (localhost) to avoid network delays
While running the client, response time jumps from 3 milliseconds to more than 200 milliseconds
and in the same moment the server displays this line (I am running it with SET GODEBUG=gctrace=1)
gc 14 @18.400s 2%: 0.50+380+1.0 ms clock, 2.0+294/380/266+4.0 ms cpu, 344->344->182 MB, 359 MB goal, 4 P
I think that 200ms STW is a bit too much and would like to know how to fix this beahvior
I have a dropbox folder with server and client sources, and corresponding SQLITE DB and command text file
(https://www.dropbox.com/sh/e2timsyjifvp61i/AAAmDoKSP7NANjDlsYcGcBvGa?dl=0)
the client must be executed with 2 parameters:
My concern is not the throughput but the latency
Our application drives an automated machine that must have the response back in 10ms
Maybe related to this issue: https://github.com/golang/go/issues/9477
Just changing the key of the maps from string to int drop the GC time to 5 milliseconds
Most helpful comment