Connect to redis through C# redis client slow ! -
may know benchmark c# redis ? try connect redis through tcp/ip 456 bytes data. benchmark below:
hset - 600 writes/seconds, loop 10000 times 600 reads/seconds, loop 10000 times
it normal? suspect tcp/ip transfer rate slow because slow transfer rate 156 kbps. had set tcp receive window size speed still same. tried using ubuntu benchmark redis through tcp/ip. transfer rate can 3 mbps. hset - >10k per seconds.
the problem latency - while redis can handle many thousands of operations per second, single synchronous connection spend of it's time waiting network. test loop like:
client network server send 1ms process (0.01 ms) 1ms result received
so operation takes total time of 2.01ms, both client , server idle of that. means can make use of parallelism - split loop across 100 threads there no waiting on network , can 100 results in same 2ms.
the difference in ubuntu due fact running on same server redis - though using ip rather unix sockets, localhost has lower latency connection between different servers.
Comments
Post a Comment