tidwall / redcon

Redis compatible server framework for Go
MIT License
2.19k stars 158 forks source link

what's the max concurrent subscriber redcon can take? #40

Closed hiqsociety closed 3 years ago

hiqsociety commented 3 years ago

Would like to understand how much memory is allocated for each connection. If you can share some insights to what to look out for for high concurrent connections and how to improve etc, will be great. Have yet to check out the internal mechanics of the code.

tidwall commented 3 years ago

There are no maximums or hard limits. It's going to depend on system resources. As far as how much memory pre connection, I recommend that you spin up a test server on the system that you are targeting in production and try a ton of connections. Ideally using a workload that matches what you'd see in production. Then use the runtime.MemStats function to analyze the memory usage.

hiqsociety commented 3 years ago

Want to stretch the limit. Can you advise what settings to do on linux side?

hiqsociety commented 3 years ago

For your "Benchmarks", can you specify whether you have nobinlog enabled on redis side? Just to confirm the 2x performance gain from using redcon that's all. Not sure what setting is used for redis.

tidwall commented 3 years ago

I won’t advise on tweaks to your Linux system. You’ll need to discover what works best for you.

tidwall commented 3 years ago

The “Benchmarks” describe the settings and system used for redis and redis-benchmark. I don’t know what “nobinlog” is, but all disk writes were turned off.