Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

httperf gives warning open file descriptor on ubuntu 12.04 but not in Ubuntu 10.04

I have been running load tests using httperf for a few weeks and getting this error -

httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
when I fire query from OS - Ubuntu 12.04 LTS (64 bit machine). 

But if I run the same command on from a 32 bit machine having OS - 10.04 LTS; I don't get the error message.

Also, I did follow other posts to try increase the file descriptor size limit using "ulimit -n" command and also tried changing using the

/usr/include/bits/typesizes.h

#define __FD_SETSIZE 65535

But the methods failed.

Can somebody please suggest something ?

Observation:
No need was required to make any changes in 32 machine (with Ubuntu 10.10) so what is the real difference in Ubuntu 12.04 ? Also, I tried on different machines (all having 64 bit architecture were having same issue)

like image 924
Vikas Goel Avatar asked Feb 08 '13 14:02

Vikas Goel


1 Answers

This is also a problem on 14.04.

To solve the problem, follow these steps:

  1. add the following lines to /etc/security/limits.conf
 * hard nofile 65532
 * soft nofile 65532 
 root hard nofile 65532
 root soft nofile 65532
  1. in /usr/include/x86_64-linux-gnu/bits/typesizes.h,find __FD_SETSIZE and replace its value with 65532

  2. Download httperf from http://sourceforge.net/projects/httperf/

  3. build and install from source. Follow instructions in README, however you’ll need to install dependencies if you haven't already.

sudo apt-get install libtool libssl openssl automake libevent-dev 

I changed some formatting, but this is mostly postcotso's work. Source Document

like image 84
Josiah Avatar answered Nov 07 '22 09:11

Josiah