Hi, On Friday, October 24, 2014 3:07:24 AM UTC-7, Sergei wrote: > > I did tests. > I have another one nodejs app. And I made tests on it. > This nodejs app isn't HTTP server. It is game server. > It is realtime server where users keep the connection during all time they > are playing. > There is CentOS release 6.5 (Final) on server. > > I run these node versions: > v0.10.7 > v0.10.30 > v0.10.fix Using an unsorted array > v0.10.fix Using a heap > > on 3K-3.5K connections. > > There are results in attach. > > v0.10.30 + 3K connections loaded CPU at 100%. > v0.10.fix Using an unsorted array has a little bit better performance > then v0.10.fix Using a heap. It seems to me. > > Can i use v0.10.fix Using an unsorted array or v0.10.fix Using a heap on > production servers? >
It's been a long time since I worked on these fixes, and I can't provide you with any guarantee today that they won't break anything today. Before running with either one of these fixes on production servers, you should at least (and after you applied one of these changes) run the whole tests suite that comes with Node.js' source code. To run these tests, you could run: $ make test test-pummel test-internet test-timers It would take some time to run, but it should give you a pretty good idea if anything obvious was broken by merging one of these fixes. Some tests might fail. In this case please let us know and we should be able to tell you if these failures are actual issues. > How do you think - what implementation is better in my case? > Theoretically, the unsorted list implementation performs better if you don't fall into the pathological case of having a lot of connections timing out one after another in very short intervals. The heap implementation's performance is slightly less good than the unordered list implementation, however its worst case performs better than the unordered list worst case. If the CPU usage of running the heap implementation is good enough, it would probably be your safest bet. However, as proposed in this issue: https://github.com/joyent/node/issues/8160, we may include the unordered list implementation in the next 0.10 relase (0.10.34). Thus going for the unordered list fix would probably be a better choice since you wouldn't diverge from what's going to be the next stable release. The reason why we would be including the unordered list implementation and *not* the heap implementation in the next release is that the heap internal module used by the current heap implementation cannot be included as is. There are some design issues to consider before we can integrate it. In other words, what I suggest is that you go with the unordered list implementation for now and subscribe to this issue: https://github.com/joyent/node/issues/8160. If we end up including the unordered list implementation in 0.10.34, you'll have the same behavior when you upgrade. Does that make sense? What else can I help? > Let's wait to see if we can land the unordered list implementation in 0.10.34. In the meantime, please let us know if you have any issue running your code with the unordered list fix. Thank you very much for your help! Julien -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/6f8fe574-a2da-46b7-b762-c4f41a34761f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
