【问题标题】:httperf gives warning open file descriptor on ubuntu 12.04 but not in Ubuntu 10.04httperf 在 ubuntu 12.04 上给出警告打开文件描述符,但在 Ubuntu 10.04 中没有
【发布时间】:2013-01-24 08:26:15
【问题描述】:

我已经使用 httperf 运行负载测试几个星期并收到此错误 -

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). 

但是,如果我从具有 OS - 10.04 LTS 的 32 位机器上运行相同的命令;我没有收到错误消息。

另外,我确实按照其他帖子尝试使用“ulimit -n”命令增加文件描述符大小限制,并尝试使用

/usr/include/bits/typesizes.h

#define __FD_SETSIZE 65535

但是方法失败了。

有人可以提出一些建议吗?

观察:
不需要对 32 台机器(使用 Ubuntu 10.10)进行任何更改,那么 Ubuntu 12.04 的真正区别是什么?另外,我在不同的机器上试过(所有的 64 位架构都有同样的问题)

【问题讨论】:

    标签: ubuntu-12.04 ubuntu-10.10 httperf


    【解决方案1】:

    这也是 14.04 的问题。

    要解决此问题,请按以下步骤操作:

    1. 将以下行添加到 /etc/security/limits.conf
     * hard nofile 65532
     * soft nofile 65532 
     root hard nofile 65532
     root soft nofile 65532
    
    1. 在/usr/include/x86_64-linux-gnu/bits/typesizes.h中,找到__FD_SETSIZE并将其值替换为65532

    2. http://sourceforge.net/projects/httperf/下载httperf

    3. 从源代码构建和安装。按照 README 中的说明进行操作,但如果您还没有安装依赖项,则需要安装。

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

    我更改了一些格式,但这主要是postcotso 的工作。 Source Document

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-14
      • 1970-01-01
      • 2016-04-12
      • 1970-01-01
      • 2015-03-29
      • 1970-01-01
      相关资源
      最近更新 更多