Playing and trying to see how fast node.js can serve a static file from disk using apache bench
ab -r -n 10000 -c 1000 http://server:8080/loadtestfile.txt
I've got ulimit problem on Ubuntu 11.04 x64 VirtualBox VM on OSX Lion
(node) Hit max file limit. Increase "ulimit - n"
I can't increase the limit anymore.
$ ulimit -n 1000000
$ limit -n 1100000
-su: ulimit: open files: cannot modify limit: Operation not permitted
Is this the right way to force node.js to reload the file from disk to serve each HTTP request? How do I increase the limit beyond 1000000?
Normal curl request works:
curl http://server:8080/loadtestfile.txt
Code
var sys = require('sys'),
http = require('http'),
fs = require('fs'),
index;
http.createServer(function(request, response) {
fs.readFile('./loadtestfile.txt', function (err, data) {
response.writeHeader(200, {"Content-Type": "text/plain"});
response.write(data);
response.end();
});
}).listen(8080);