Changing the file descriptor size in httperf

和自甴很熟 提交于 2019-12-01 02:12:22

问题


I'm doing a series of benchmarks and found the httpperf tool.

But the version in my ubuntu 12.04 has a too small file descriptor size. Because it warns me with this message:

  • httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE

There used to be guide to compile httperf with a bigger size in http://gom-jabbar.org/articles/2009/02/04/httperf-and-file-descriptors but the site is down now.

Does anyone knows the steps to compile the tool with the proper settings?


回答1:


I've always followed the instructions here, which should set the global values properly. You can check by issuing a ulimit -n (N.B. I had to include ulimit -n 65535 in my .profile — for some reason named users don't require this but root does.)

Don't forget to recompile httperf. Before doing make install issue a ./httperf -v | grep maximum — you should see 65535. If not, something went wrong.

I am working on a similar project (httperf 0.9.0 on Ubuntu 12.04) but I am having some difficulty getting httperf to actually compile properly. I'm sure I've forgotten something basic, but let me know how you fare. EDIT: Realized my problem was a library version incompatibility. I imported the binary built on a different server and it works fine.




回答2:


I came to this answer and didn't want to go through the hassle of recompiling a package I'd installed via apt-get. What I ultimately did was just use the ab command instead:

ab -c 5 -n 50000 http://localhost:5000

Hope this helps someone else that is encourtering this bug.



来源:https://stackoverflow.com/questions/16445074/changing-the-file-descriptor-size-in-httperf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!