3 ms·
I would find it hard to believe that c++ can be that much faster for many websites since the bottleneck would be the I/O subsystem. I don't understand how they
by samfisher83 11y ago
I would find it hard to believe that c++ can be that much faster for many websites since the bottleneck would be the I/O subsystem. I don't understand how they are getting this 40x speed up. I wonder what the benchmark looks like.
- ploxiln 11y agoIt's not that a single request is 40x faster (it may be no faster), it's that 40x requests can be handled in the same amount of time. The limitation is then the processing of the connections both in userspace and in the kernel, and the cost of all the system calls. This is easy enough to test with ab (apache bench), siege, or jmeter, by just cranking up the number of concurrent requests. I've seen 100x differences in implementations of web servers before, 40x for python vs c++ is pretty believable.
- emcq 11y agoIn an optimized system the bottleneck will be I/O. However elements like serialization, many function calls, and extraneous memory copies chips away at performance to the point it matters and its difficult to address these problems directly in languages outside of C/C++. Today you can get 15MB/s to S3. A not uncommon mysql node might do 10MB/s. Good luck trying to push that throughput with python or Ruby on a single process through a http response. Much faster I/O exists with sequential HD, SSD, and RAM based I/O. Most networks are built with 1Gbit Ethernet allowing 100MB/s that won't get saturated in the slower languages without going parallel which can increase total system complexity and lines of code.
- jcyw 11y agoIts more like, with 2gb ram and 2.0ghz cpu, how many requests can you handle? Its not surprising language like C++ would win.
- nickpsecurity 11y agoFunny you say that given I'm dusting off an old laptop that has a 1.xGhz Core Duo CPU and 2GB of RAM. It's the next one to be used for performance and stress testing. The reason? Anything that can't run snappy on that box is just bloated or wasting resources. Lean, native code tends to do the job nicely. :) Note: Also good to do it on cheap, throwaways because this sort of thing burns out the CPU's. Better that box than my main one.
- samfisher83 11y agoI get down voted for posing a logical question?
- Rexxar 11y agoI don't see any question.