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

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
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 楊粼波 閱讀(765) 評論(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>
            欧美午夜视频| 国模大胆一区二区三区| 久久中文字幕导航| 欧美视频在线视频| 亚洲丶国产丶欧美一区二区三区| 国产精品av久久久久久麻豆网| 欧美顶级少妇做爰| 韩国福利一区| 欧美伊人影院| 久久成人精品电影| 国产精品亚洲аv天堂网| 99精品99久久久久久宅男| 99精品视频一区二区三区| 欧美 日韩 国产精品免费观看| 美女视频网站黄色亚洲| 狠狠色综合网站久久久久久久| 亚洲欧美一区在线| 欧美一级在线视频| 国产精品露脸自拍| 亚洲影院高清在线| 欧美亚洲一区二区在线| 国产精品一区在线观看你懂的| 亚洲视频免费观看| 香蕉免费一区二区三区在线观看| 欧美性久久久| 宅男噜噜噜66一区二区| 亚洲一区日韩在线| 国产精品国产三级国产aⅴ入口| 99v久久综合狠狠综合久久| 一区二区欧美在线| 国产精品swag| 午夜亚洲一区| 欧美 日韩 国产一区二区在线视频| 有坂深雪在线一区| 免费日韩成人| 野花国产精品入口| 午夜一区二区三区不卡视频| 国产一区二区在线观看免费| 久久免费视频这里只有精品| 亚洲第一级黄色片| 亚洲特级毛片| 国产亚洲一区二区在线观看 | 久久精品一级爱片| 好看的日韩av电影| 欧美 亚欧 日韩视频在线| 亚洲精品一区二区三区福利| 亚洲伦理网站| 国产精品日韩高清| 久久久久一区二区三区| 亚洲日本成人| 欧美影院一区| 亚洲精品一区二区三区福利| 欧美日韩在线大尺度| 亚洲欧美成人精品| 男人天堂欧美日韩| 在线亚洲观看| 在线观看亚洲| 欧美日韩免费看| 久久成人久久爱| 亚洲人成在线观看| 久久国内精品视频| av成人手机在线| 红杏aⅴ成人免费视频| 欧美日韩国产在线看| 午夜久久资源| 亚洲区一区二区三区| 久久精品国产精品| 这里只有精品视频在线| 国产亚洲一级| 欧美三级小说| 欧美fxxxxxx另类| 欧美专区18| 亚洲网站在线播放| 亚洲国产精品热久久| 久久av一区| 亚洲午夜在线观看视频在线| 亚洲国产精品久久久久婷婷884 | 美日韩精品免费观看视频| 亚洲自拍偷拍福利| 亚洲区一区二区三区| 久久综合九色综合欧美就去吻| 亚洲天堂av电影| 亚洲清纯自拍| 黑人巨大精品欧美黑白配亚洲| 国产精品久久久久9999| 欧美激情 亚洲a∨综合| 久久久久一区二区| 欧美在线3区| 西瓜成人精品人成网站| 亚洲一区成人| 亚洲视频一区在线| 亚洲一区二三| 亚洲丰满少妇videoshd| 久久理论片午夜琪琪电影网| 一本色道久久综合亚洲二区三区 | 欧美一区国产一区| 亚洲最快最全在线视频| 亚洲精选成人| 亚洲激情一区| 亚洲激情校园春色| 亚洲欧洲日产国产网站| 亚洲国产精品久久人人爱蜜臀 | 亚洲第一网站| 1024亚洲| 亚洲福利视频一区| 亚洲第一综合天堂另类专| 精品二区久久| 亚洲缚视频在线观看| 亚洲国产精品视频| 激情亚洲成人| 亚洲国产成人精品久久久国产成人一区 | 一区二区日韩| 宅男噜噜噜66一区二区| 中日韩美女免费视频网址在线观看 | 久热精品视频在线观看一区| 久久亚洲国产成人| 麻豆亚洲精品| 欧美精品一区二区在线观看 | 国产一区二区三区四区在线观看 | 性色av一区二区三区| 午夜日韩在线观看| 久久爱www| 久久躁日日躁aaaaxxxx| 欧美成人一区二区三区| 欧美日韩亚洲一区二区三区在线观看 | 一区二区成人精品| 午夜精品亚洲一区二区三区嫩草| 欧美在线播放| 欧美高清影院| 国产精品视频导航| 亚洲福利视频专区| 亚洲视频一区二区| 久久久免费精品| 欧美激情一区二区三区 | 美女图片一区二区| 欧美日韩一区高清| 国产一区视频在线观看免费| 亚洲区欧美区| 午夜电影亚洲| 欧美激情无毛| 亚洲综合999| 嫩草国产精品入口| 国产精品视频| 亚洲久色影视| 久久精品国产77777蜜臀| 亚洲风情在线资源站| 亚洲小视频在线观看| 久久青草欧美一区二区三区| 欧美视频在线一区| 伊人成年综合电影网| 一区二区三区视频在线| 久久视频在线视频| 一本到12不卡视频在线dvd| 久久国产精品久久久久久| 欧美日韩三区四区| 一区在线观看视频| 亚洲欧美在线一区| 亚洲激情影视| 久久久久久久久久久成人| 国产精品videosex极品| 亚洲欧洲日韩女同| 久久久精品欧美丰满| 99精品国产99久久久久久福利| 久久亚洲综合网| 国产小视频国产精品| 亚洲天堂成人在线观看| 欧美国产在线电影| 久久久噜噜噜久久久| 国产精品色婷婷久久58| 一区二区三欧美| 欧美成人在线网站| 久久久www成人免费无遮挡大片| 国产精品v欧美精品v日本精品动漫| 亚洲欧洲日本专区| 麻豆av一区二区三区久久| 亚洲午夜在线| 国产精品久久7| 99综合在线| 亚洲日本视频| 欧美不卡视频| 亚洲精品免费观看| 欧美黄色成人网| 老司机精品久久| 亚洲国产日韩欧美| 欧美第一黄网免费网站| 久久精品国产清自在天天线 | 国产精品久久婷婷六月丁香| 一本色道**综合亚洲精品蜜桃冫 | 欧美成人乱码一区二区三区| 欧美专区在线| 黄色成人在线网站| 久久亚洲色图| 久久综合中文色婷婷| 亚洲精品1区| 亚洲电影在线观看| 欧美精品一区二区三区蜜桃| 一本大道久久a久久综合婷婷| 亚洲人成高清| 欧美视频观看一区| 午夜视频在线观看一区二区|