helpstudy 发表于 2013-04-27 15:26

在linux下写了一个服务器程序用什么工具或命令测试服务器支持最大连接数

大牛们,求赐教:em27:

linux_c_py_php 发表于 2013-04-27 15:53

getrlimit就可以获得了.

helpstudy 发表于 2013-04-27 16:03

你好,是这样的,就好像你以前发过相关服务器文章,写的很好,受教了,我想去测一下该程序支持的连接数,怎么去做,[基于Epoll内置Leader-Follower服务端实现, 已可达50万echo qps(全新支持Lua啦)]
http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=4067753&fromuid=24174632
回复 2# linux_c_py_php


   

linux_c_py_php 发表于 2013-04-27 16:10

一直connect, 而且不关闭, 看连接了多少次.

helpstudy 发表于 2013-04-27 16:16

谢谢,不用代码去实现,在linux下有没有类似这种工具或者命令呢?还有我把你代码下载下来细仔读了,为什么在工作线程中 int numEvents = epoll_wait(epfd, &event, 1, 1000); maxevents参数值为1,如果多个事件发生,会不会发生丢失现象,求指教 回复 4# linux_c_py_php


   

linux_c_py_php 发表于 2013-04-27 16:20

不会呀, leader-follower一个线程同一时刻只处理一个连接, 事件存在总会通知的, 不会丢失.

helpstudy 发表于 2013-04-27 16:32

多谢 :lol: 回复 6# linux_c_py_php


   
页: [1]
查看完整版本: 在linux下写了一个服务器程序用什么工具或命令测试服务器支持最大连接数