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

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
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>
            亚洲免费影视| 久久精品国产亚洲一区二区三区| 欧美freesex交免费视频| 性18欧美另类| 狠狠色综合网| 欧美高清在线精品一区| 欧美肥婆bbw| 亚洲美女淫视频| 一区二区三区日韩精品| 国产九九精品视频| 久久网站热最新地址| 免费亚洲一区二区| 99国产精品视频免费观看| av成人天堂| 国产亚洲成av人片在线观看桃 | 国产三级精品三级| 久久综合精品国产一区二区三区| 久久久亚洲高清| 亚洲欧洲精品天堂一级| 99亚洲精品| 国产一区二区精品久久| 亚洲国产高清一区二区三区| 欧美精品一区二区三区很污很色的 | 国产精品白丝jk黑袜喷水| 亚洲男人天堂2024| 久久另类ts人妖一区二区| 亚洲精品综合精品自拍| 亚洲亚洲精品在线观看| 在线观看91久久久久久| 中文亚洲视频在线| 伊人久久婷婷| 一本色道久久综合亚洲二区三区| 国产视频精品网| 亚洲欧洲一区| 国产一区二区三区高清播放| 亚洲三级影片| 在线观看一区欧美| 一区二区三区免费网站| 亚洲国产一区视频| 午夜视频一区二区| 中日韩美女免费视频网站在线观看| 欧美一区二区三区四区在线| 一区二区免费在线视频| 久久香蕉精品| 香蕉久久国产| 欧美精品性视频| 久久亚洲不卡| 国产日韩在线播放| 中文一区二区在线观看| 亚洲国产中文字幕在线观看| 欧美制服第一页| 西瓜成人精品人成网站| 欧美日韩国产精品一区二区亚洲| 免费一级欧美片在线观看| 国产精品爽黄69| 99人久久精品视频最新地址| 亚洲黄色天堂| 麻豆精品网站| 欧美www在线| 精品盗摄一区二区三区| 欧美亚洲一级| 久久爱91午夜羞羞| 国产乱码精品一区二区三区五月婷 | 久久国产精品色婷婷| 午夜电影亚洲| 国产精品视频网站| 亚洲天堂免费观看| 亚洲午夜视频在线| 欧美视频免费在线观看| 日韩一级免费观看| 亚洲一区二区在线免费观看| 欧美日韩一区二区高清| 欧美高清在线视频| 亚洲欧洲精品一区| 在线一区二区视频| 欧美片第一页| 亚洲麻豆一区| 亚洲一级片在线看| 国产精品久久久一区麻豆最新章节| 日韩网站在线| 亚洲一区影音先锋| 国产精品一卡二| 久久成人精品视频| 欧美ed2k| 夜夜嗨av一区二区三区| 欧美日韩在线不卡| 亚洲伊人伊色伊影伊综合网| 欧美在线三区| 亚洲成色777777在线观看影院| 久久久国产精品一区二区三区| 看片网站欧美日韩| 日韩亚洲在线观看| 国产精品久久| 午夜在线一区| 欧美激情精品久久久久久蜜臀| 99国产精品视频免费观看一公开 | 欧美日韩视频在线一区二区| 亚洲欧美日韩国产中文| 久久精品一区二区国产| 亚洲国产欧美不卡在线观看| 欧美日韩123| 欧美在线精品免播放器视频| 亚洲国产经典视频| 欧美一级久久久久久久大片| 18成人免费观看视频| 欧美亚一区二区| 老司机午夜精品视频| 一区二区三区 在线观看视频| 久久久久亚洲综合| 国产精品99久久久久久白浆小说| 国产婷婷97碰碰久久人人蜜臀| 欧美激情五月| 久久精品视频在线播放| 亚洲色图综合久久| 亚洲成色777777在线观看影院| 午夜欧美大尺度福利影院在线看| 亚洲国产一区二区在线| 国产欧美精品日韩区二区麻豆天美| 免费成人小视频| 久久国产精品网站| 亚洲午夜在线视频| 亚洲黑丝在线| 美国十次成人| 欧美中文字幕精品| 亚洲一区二区在线观看视频| 91久久久久久久久| 尤物网精品视频| 国产视频欧美视频| 国产精品免费看片| 欧美日韩在线精品| 欧美久久久久久蜜桃| 蜜臀久久久99精品久久久久久| 久久国产手机看片| 亚洲欧美日韩精品久久奇米色影视| 亚洲美女精品久久| 亚洲国产精品久久久久| 女同一区二区| 男人的天堂亚洲| 免费在线欧美视频| 免费视频亚洲| 欧美高清你懂得| 美女日韩在线中文字幕| 久久综合狠狠综合久久综合88 | 黄色精品免费| 国产自产高清不卡| 国产日韩在线看| 国产视频一区二区在线观看| 国产精品欧美一区喷水 | 欧美在线高清视频| 欧美一区二区三区四区在线观看地址 | 欧美成在线视频| 欧美激情第五页| 亚洲国产精品成人综合色在线婷婷| 亚洲第一偷拍| 日韩视频在线你懂得| 一本大道久久a久久综合婷婷| 一本久久综合亚洲鲁鲁五月天| 亚洲激情校园春色| 一本色道久久88精品综合| 亚洲午夜精品国产| 欧美在线在线| 欧美成人蜜桃| 欧美日韩国产天堂| 国产乱码精品一区二区三区五月婷 | 亚洲在线成人| 欧美专区亚洲专区| 老司机一区二区三区| 欧美激情亚洲精品| 国产精品久久久久久久久免费桃花| 国产欧美日韩免费| 亚洲第一级黄色片| 一区二区久久久久| 久久精品国产77777蜜臀 | 一区二区三区欧美亚洲| 亚洲欧美中日韩| 久久人体大胆视频| 亚洲欧洲日产国产综合网| 亚洲无限乱码一二三四麻| 久久成人精品无人区| 欧美女激情福利| 国产日产欧美一区| 亚洲乱码国产乱码精品精98午夜| 亚洲一区亚洲| 欧美~级网站不卡| 亚洲一级特黄| 欧美顶级大胆免费视频| 国产精品国产三级国产专播精品人| 国产日产欧美精品| 日韩一区二区精品在线观看| 欧美一区二区三区四区夜夜大片| 欧美激情中文不卡| 亚洲一区免费看| 男人插女人欧美| 国产人成一区二区三区影院| 亚洲精品免费观看| 麻豆av一区二区三区| 亚洲一区二区免费在线| 农村妇女精品| 国产自产v一区二区三区c| 亚洲专区免费|