It would be really useful for him to say what Node.js version he's using. Node <=0.2.3 has a bug related to reaching the file descriptor limit of the OS that makes CPU usage go through the roof, for example.
To be honest, though, this is the result you really should expect. Node.js is a relatively new thing that is a bit of a clever hack on top of a language runtime that is powerful but was not directly designed for this usecase, running a language that is also powerful but not directly designed for this use case. Erlang is a language that has been open source for 12 years (and was actually started in 1986), both the language and the runtime are specifically designed for this use case and has had years of tuning and bugfixes, and this problem is right smack dab in the middle of what Erlang targets.
This isn't a criticism of Node.js... it's just the way it is. Every language was young sometime.
(It will be interesting to see if Node.js ever quite catches up, though; when you've really pushed the performance to the max for a given design decision, you get down to the point where you can't improve without changing those decisions. Erlang's GC, for instance, is absolutely written around having a lot of threads that may be running on different CPUs, which adds a lot of complexity that the V8 project, or any JS runtime project in general, may be loathe to introduce into what is still fundamentally something that should be able to go into a browser. But that's for the future to resolve.)
Yes! This! Let's be reasonable adults about this: node.js and V8 are very new projects that are really impressive given their age. OTP is an incredibly mature and proven platform.
When I wrote the Node.js server in September, the latest version was v0.2.3; which is what I tested on. I failed to mention that in the post, but thanks for pointing that out.
I'll run the test again later tonight and post a follow up.
I had to restart my node servers almost on a daily basis because of this bug. Was about ready to jump on Erlang myself ironically (building a stream server with mochiweb). Glad I read this and will give Node.js some more time to mature.
I just glanced at his traces, and it appears GC is taking on the order of seconds near the end. Since he had only 1 client, I'm guessing it's more a problem with garbage collection than with file descriptors. Of course, only a test with the newer version of Node will tell...
Comments
It would be really useful for him to say what Node.js version he's using. Node <=0.2.3 has a bug related to reaching the file descriptor limit of the OS that makes CPU usage go through the roof, for example.
To be honest, though, this is the result you really should expect. Node.js is a relatively new thing that is a bit of a clever hack on top of a language runtime that is powerful but was not directly designed for this usecase, running a language that is also powerful but not directly designed for this use case. Erlang is a language that has been open source for 12 years (and was actually started in 1986), both the language and the runtime are specifically designed for this use case and has had years of tuning and bugfixes, and this problem is right smack dab in the middle of what Erlang targets.
This isn't a criticism of Node.js... it's just the way it is. Every language was young sometime.
(It will be interesting to see if Node.js ever quite catches up, though; when you've really pushed the performance to the max for a given design decision, you get down to the point where you can't improve without changing those decisions. Erlang's GC, for instance, is absolutely written around having a lot of threads that may be running on different CPUs, which adds a lot of complexity that the V8 project, or any JS runtime project in general, may be loathe to introduce into what is still fundamentally something that should be able to go into a browser. But that's for the future to resolve.)
Yes! This! Let's be reasonable adults about this: node.js and V8 are very new projects that are really impressive given their age. OTP is an incredibly mature and proven platform.
EDIT: If you're interested to really see what node.js's main issues are, check out Ryan Dahl's (node.js creator) presentation at JSConf.eu 2010. http://jsconf.eu/2010/speaker/techniques_for_a_single_stack....
EDIT (2): Yes, meant OTP, not OLTP. :)
Minor pedantry note: I think you mean OTP (http://en.wikipedia.org/wiki/Open_Telecom_Platform), rather than OLTP (http://en.wikipedia.org/wiki/OLTP).
When I wrote the Node.js server in September, the latest version was v0.2.3; which is what I tested on. I failed to mention that in the post, but thanks for pointing that out.
I'll run the test again later tonight and post a follow up.
A follow up would be great. 0.2.3 apparently had a file descriptor bug which could be the cause of this.
http://twitter.com/#!/ryah/status/10748819335553024
I had to restart my node servers almost on a daily basis because of this bug. Was about ready to jump on Erlang myself ironically (building a stream server with mochiweb). Glad I read this and will give Node.js some more time to mature.
I just glanced at his traces, and it appears GC is taking on the order of seconds near the end. Since he had only 1 client, I'm guessing it's more a problem with garbage collection than with file descriptors. Of course, only a test with the newer version of Node will tell...