青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

epoll Scalability Web Page

epoll Scalability Web Page

Introduction

Davide Libenzi wrote an event poll implementation and described it at the /dev/epoll home page here. His performance testing led to the conclusion that epoll scaled linearly regardless of the load as defined by the number of dead connections. However, the main hindrance to having epoll accepted into the mainline Linux kernel by Linus Torvalds was the interface to epoll being in /dev. Therefore, a new interface to epoll was added via three new system calls. That interface will hereafter be referred to as sys_epoll. Download sys_epoll here.


sys_epoll Interface


  • int epoll_create(int maxfds);

    The system call epoll_create() creates a sys_epoll "object" by allocating space for "maxfds" descriptors to be polled. The sys_epoll "object" is referenced by a file descriptor, and this enables the new interface to :

    • Maintain compatibility with the existing interface
    • Avoid the creation of a epoll_close() syscall
    • Reuse 95% of the existing code
    • Inherit the file* automatic clean up code

  • int epoll_ctl(int epfd, int op, int fd, unsigned int events);

    The system call epoll_ctl() is the controller interface. The "op" parameter is either EP_CTL_ADD, EP_CTL_DEL or EP_CTL_MOD. The parameter "fd" is the target of the operation. The last parameter, "events", is used in both EP_CTL_ADD and EP_CTL_MOD and represents the event interest mask.

  • int epoll_wait(int epfd, struct pollfd * events, int maxevents, int timeout);

    The system call epoll_wait() waits for events by allowing a maximum timeout, "timeout", in milliseconds and returns the number of events ( struct pollfd ) that the caller will find available at "*events".

sys_epoll Man Pages

Testing

We tested using two applications:

  • dphttpd
  • pipetest

dphttpd

Software

The http client is httperf from David Mosberger. Download httperf here. The http server is dphttpd from Davide Libenzi. Download dphttpd here. The deadconn client is also provided by Davide Libenzi. Download deadconn here.

Two client programs (deadconn_last and httperf) run on the client machine and establish connections to the HTTP server (dphttpd) running on the server machine. Connections established by deadconn_last are "dead". These send a single HTTP get request at connection setup and remain idle for the remainder of the test. Connections established by httperf are "active". These continuously send HTTP requests to the server at a fixed rate. httperf reports the rate at which the HTTP server replies to its requests. This reply rate is the metric reported on the Y-axis of the graphs below.

For the tests, the number of active connections is kept constant and the number of dead connections increased from 0 to 60000 (X-axis of graphs below). Consequently, dphttpd spends a fixed amount of time responding to requests and a variable amount of time looking for requests to service. The mechanism used to look for active connections amongst all open connections is one of standard poll(), /dev/epoll or sys_epoll. As the number of dead connections is increased, the scalability of these mechanisms starts impacting dphttpd's reply rate, measured by httperf.

dphttpd SMP

Server

  • Hardware: 8-way PIII Xeon 700MHz, 2.5 GB RAM, 2048 KB L2 cache
  • OS : RedHat 7.3 with 2.5.44 kernel, patched with ONE of:
  • /proc/sys/fs/file-max = 131072
  • /proc/sys/net/ipv4/tcp_fin_timeout = 15
  • /proc/sys/net/ipv4/tcp_max_syn_backlog = 16384
  • /proc/sys/net/ipv4/tcp_tw_reuse = 1
  • /proc/sys/net/ipv4/tcp_tw_recycle = 1
  • /proc/sys/net/ipv4/ip_local_port_range = 1024 65535
  • # ulimit -n 131072
  • # dphttpd --maxfds 20000 --stksize 4096
  • default size of reply = 128 bytes

Client

  • Hardware: 4-way PIII Xeon 500MHz, 3 GB RAM, 512 KB L2 cache
  • OS : RedHat 7.3 with 2.4.18-3smp kernel
  • /proc/sys/fs/file-max = 131072
  • /proc/sys/net/ipv4/tcp_fin_timeout = 15
  • /proc/sys/net/ipv4.tcp_tw_recycle = 1
  • /proc/sys/net/ipv4.tcp_max_syn_backlog = 16384
  • /proc/sys/net/ipv4.ip_local_port_range = 1024 65535
  • # ulimit -n 131072
  • # deadconn_last $SERVER $SVRPORT num_connections
    where num_connections is one of 0, 50, 100, 200, 400, 800, 1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000.
  • After deadconn_last reports num_connections established
    # httperf --server=$SERVER --port=$SVRPORT --think-timeout 5 --timeout 5 --num-calls 20000 --num-conns 100 --hog --rate 100

Results for dphttpd SMP

dphttpd UP

Server

  • 1-way PIII, 866MHz, 256 MB RAM
  • OS: 2.5.44 gcc 2.96 (RedHat 7.3)
  • /proc/sys/fs/file-max = 65536
  • /proc/sys/net/ipv4/tcp_fin_timeout = 15
  • /proc/sys/net/ipv4/tcp_tw_recycle = 1
  • # ulimit -n 65536
  • # dphttpd --maxfds 20000 --stksize 4096
  • default size of reply = 128 bytes

    Client

    • 1-way PIII, 866MHz, 256 MB RAM
    • OS: 2.4.18, gcc 2.96 (RedHat 7.3)
    • /proc/sys/fs/file-max = 65536
    • /proc/sys/net/ipv4/tcp_fin_timeout = 15
    • /proc/sys/net/ipv4.tcp_tw_recycle = 1
    • # ulimit -n 65536
    • # deadconn_last $SERVER $SVRPORT num_connections
      where num_connections is one of 0, 50, 100, 200, 400, 800, 1000, 2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000.
    • After deadconn_last reports num_connections established
      # httperf --server=$SERVER --port=$SVRPORT --think-timeout 5 --timeout 5 --num-calls 20000 --num-conns 100 --hog --rate 100

    Results for dphttpd UP



    Pipetest

    David Stevens added support for sys_epoll to Ben LaHaise's original pipetest.c application. Download Ben LaHaise's Ottawa Linux Symposium 2002 paper including pipetest.c here.Download David Steven's patch to add sys_epoll to pipetest.c here.


    Pipetest SMP

    System and Configuration

    • 8-way PIII Xeon 900MHz, 4 GB RAM, 2048 KB L2 cache
    • OS: RedHat 7.2 with 2.5.44 kernel, patched with one of:
    • /proc/sys/fs/file-max = 65536
    • # ulimit -n 65536
    • # pipetest [poll|aio-poll|sys-epoll] num_pipes message_threads max_generation
      • where num_pipes is one of 10, 100, 500, or 1000-16000 in increments of 1000
      • message_threads is 1
      • max_generantion is 300

    Results for pipetest on an SMP

    Results for Pipetest on a UP

    Same Hardware and Configuration as with the SMP pipetest above
    with CONFIG_SMP = n being the only change.

    sys_epoll stability comparisons Oct 30, 2002


    Following are performance results comparing version 0.14 of the (Download v0.14 here) to the version, v0.9, originally used for the performance testing outlined above. (Download v0.9 here) Testing was done using two measures: pipetest details here. and dphttpd details here..

    Analysis and Conclusion

    The system call interface to epoll performs as well as the /dev interface to epoll. In addition sys_epoll scales better than poll and AIO poll for large numbers of connections. Other points in favour of sys_epoll are:

    • sys_epoll is compatible with synchronous read() and write() and thus makes it usable with existing libraries that have not migrated to AIO.
    • Applications using poll() can be easily migrated to sys_epoll while continuing to use the existing I/O infrastructure.
    • sys_epoll will be invisible to people who don't want to use it.
    • sys_epoll has a low impact on the existing source code.
      
      arch/i386/kernel/entry.S  |    4
      fs/file_table.c           |    4
      fs/pipe.c                 |   36 +
      include/asm-i386/poll.h   |    1
      include/asm-i386/unistd.h |    3
      include/linux/fs.h        |    4
      include/linux/list.h      |    5
      include/linux/pipe_fs_i.h |    4
      include/linux/sys.h       |    2
      include/net/sock.h        |   12
      net/ipv4/tcp.c            |    4
      

    Due to these factors sys_epoll should be seriously considered for inclusion in the mainline Linux kernel.

    Acknowledgments

    Thank You to: Davide Libenzi Who wrote /dev/epoll, sys_epoll and dphttpd.
    He was an all around great guy to work with.
    Also Thanks to the following people who helped with testing and this web site:
    Shailabh Nagar, Paul Larson , Hanna Linder, and David Stevens.


    posted on 2006-05-28 09:58 楊粼波 閱讀(760) 評論(0)  編輯 收藏 引用 所屬分類: 網絡編程

    青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美肥婆在线| 欧美激情综合| 99精品国产热久久91蜜凸| 在线成人www免费观看视频| 国产一区二区精品久久91| 国产午夜一区二区三区| 黑人巨大精品欧美黑白配亚洲| 国产一区999| 亚洲第一二三四五区| 亚洲区一区二| 亚洲欧美日韩视频一区| 久久精品成人一区二区三区| 乱码第一页成人| 日韩午夜精品视频| 久久高清国产| 欧美巨乳在线| 国产一级一区二区| 中文日韩欧美| 牛人盗摄一区二区三区视频| 99精品欧美一区| 久久久久久久久综合| 欧美三级电影一区| 亚洲国产精品免费| 欧美在线观看你懂的| 亚洲欧洲一区二区天堂久久| 亚洲欧美日韩精品一区二区| 免费欧美高清视频| 国产亚洲欧美一区| 亚洲免费视频成人| 亚洲精品久久嫩草网站秘色| 久久精品国内一区二区三区| 国产精品v片在线观看不卡| 亚洲高清自拍| 久久久久.com| 亚洲夜间福利| 欧美日韩国产在线一区| 在线观看日韩精品| 久久av一区| 国产精品99久久不卡二区| 米奇777超碰欧美日韩亚洲| 国产精品资源在线观看| 亚洲伊人伊色伊影伊综合网| 亚洲黄色成人网| 狼狼综合久久久久综合网| 国产一区二区看久久| 欧美在线短视频| 香蕉成人伊视频在线观看| 欧美在线观看视频在线| 国产精品久久久久久久7电影| 亚洲精品在线免费| 欧美激情一区二区三区高清视频 | 亚洲一品av免费观看| 最新精品在线| 欧美成人日本| 91久久综合| 欧美肥婆bbw| 久久综合久久综合久久综合| 黄色成人免费观看| 免费观看一区| 久久裸体艺术| 韩国精品在线观看| 老司机精品视频网站| 欧美一区二区三区免费观看视频 | 禁久久精品乱码| 久久久精品动漫| 久久国产精品毛片| 尤物九九久久国产精品的分类| 久久视频免费观看| 久久久一二三| 亚洲精品乱码久久久久久蜜桃麻豆| 嫩模写真一区二区三区三州| 欧美96在线丨欧| av成人国产| 一本色道久久88综合亚洲精品ⅰ| 欧美视频一区在线| 久久精品网址| 免费在线欧美黄色| 午夜精品久久久久久久久 | 亚洲国内在线| 欧美大片一区| 亚洲精品人人| 亚洲中午字幕| 欧美激情精品久久久久久| 久久综合色8888| 欧美中文字幕在线视频| 99精品视频免费观看视频| 欧美日韩综合久久| 欧美一区久久| 老司机午夜精品视频| 99国产成+人+综合+亚洲欧美| 99ri日韩精品视频| 影音先锋久久资源网| 久久精品夜色噜噜亚洲a∨| 蜜臀91精品一区二区三区| 日韩午夜精品视频| 亚洲综合好骚| 亚洲人成人一区二区三区| 99riav久久精品riav| 国产一区二区观看| 亚洲免费电影在线观看| 激情久久一区| 一区二区激情视频| 亚洲国产另类久久精品| 亚洲五月婷婷| 99re6这里只有精品视频在线观看| 亚洲精品色婷婷福利天堂| av成人老司机| 91久久精品国产91性色| 亚洲欧美日产图| 一本色道久久综合精品竹菊| 欧美在线视频日韩| 亚洲一区久久久| 女女同性精品视频| 久久国产福利国产秒拍| 欧美精品一区二| 欧美阿v一级看视频| 国产欧美日韩综合精品二区| 亚洲日本免费电影| 亚洲高清资源综合久久精品| 亚洲资源在线观看| 正在播放日韩| 老牛影视一区二区三区| 久久久久**毛片大全| 欧美视频在线免费看| 亚洲国产成人精品视频| 一区二区三区在线高清| 校园春色国产精品| 欧美夜福利tv在线| 国产精品国产自产拍高清av王其| 亚洲黄页视频免费观看| 1000部国产精品成人观看| 久久国产精品久久w女人spa| 国产一区二区三区不卡在线观看| 国产精品久久久久久久久久久久| 亚洲欧美www| 欧美在线视频在线播放完整版免费观看| 99国产麻豆精品| 久久全球大尺度高清视频| 欧美日韩视频第一区| 国产一区二区日韩精品欧美精品| 亚洲激情不卡| 久久久久国产一区二区三区| 91久久精品一区二区三区| 在线亚洲激情| 欧美精品久久久久久久久久| 国产日韩在线视频| 亚洲欧美日韩国产中文在线| 欧美激情 亚洲a∨综合| 久久成人资源| 久久免费视频观看| 中国成人亚色综合网站| 亚洲国产综合91精品麻豆| 亚洲天堂av电影| 欧美日韩另类视频| 亚洲一级高清| 久久精品毛片| 激情文学综合丁香| 免费亚洲一区二区| 夜夜狂射影院欧美极品| 性高湖久久久久久久久| 午夜精品成人在线视频| 久久久蜜桃精品| 日韩午夜在线| 国产精品免费久久久久久| 欧美在线视频全部完| 91久久久久| 久久精品电影| 亚洲美女精品一区| 国产精品永久免费| 久久久亚洲国产天美传媒修理工| 亚洲人被黑人高潮完整版| 欧美一区二粉嫩精品国产一线天| 好吊色欧美一区二区三区视频| 欧美国产精品久久| 西瓜成人精品人成网站| 亚洲国产精品t66y| 欧美在线观看一区二区| 亚洲日本一区二区三区| 国产精品揄拍500视频| 欧美岛国激情| 香蕉久久久久久久av网站| 亚洲国产精品一区制服丝袜 | 狠狠色丁香婷婷综合影院| 欧美精品一区二区三区视频| 久久精品99国产精品酒店日本| 日韩香蕉视频| 亚洲国产成人av在线| 久久午夜精品一区二区| 午夜精品理论片| 一区二区三区鲁丝不卡| 亚洲国产va精品久久久不卡综合| 国产精品视频一二三| 欧美日韩国产成人在线免费| 久久综合色婷婷| 久久精品国产精品亚洲| 亚洲综合国产| 亚洲综合色噜噜狠狠| 亚洲视频在线观看| 一区二区电影免费观看| 亚洲精品在线视频观看|