by imparikalp · 1d ago · 0 comments
Your work on WebSocket performance caught my attention since i have been working on performance optimization, memory management, and concurrency in Rust.
What language are you using? i am curious how you are achieving 6.5 million message per socket per second. Is the project open source?
I'd love to check it out and see if there's a way we could collaborate.
Just this week I wrote a performance test automation script to run through a variety of performance tests, so that I can a variety of real measured numbers for my documentation. In doing this I discovered a minor memory leak yesterday that I will work through today. The memory leak is minor enough that I can run this application in production for about 2 months before noticing memory creep, but it becomes very clear when you are generating hundreds of sockets and hundreds of million network messages in seconds.
The project is open source, but I am not exposing it just yet except when I need help with troubleshooting. The performance win comes from two things: abusing call stack creation and message queue optimization. Back in August I thought I was fast, but it turns out my profiler had a minor defect. I was actually doing only about 100,000 messages per second. Upon investigating that defect I found about 92% of the processing time was spent on memory related tasks. So, I put all my attention into optimization and abuse of memory to get to this performance boost over 2-3 weeks.
I hope to expose the application very soon. It is mostly where I need it to be for an MVP and am working on formal documentation and a performance chart. Email me and I can give you the repository address directly. My email is in my HN profile.