• <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>

            大龍的博客

            常用鏈接

            統計

            最新評論

            Linux kernel scaling: Ports and port Cycling --- 轉(http://blog.csdn.net/zgl_dm/article/details/6593661)

            NOTE: The content of this article is subject to change as we are still investigating the issue While attempting to benchmark redis a coworker (Kal McFate) and I were hitting a 28k limit on concurrent connections from a client machine to our redis server. After investigating we found the following: The default setting for the ephemeral port range on linux (net.ipv4.ip_local_port_range) is not ideal for scale. Default: 32768-61000 Recommended for scale: 1025-65000 Additionally even after changing this setting we were limited by sockets staying open in the TIME_WAIT state. Most of the poor documentation on the internet suggests setting the following in order to address the issue: net.ipv4.tcp_tw_recycle = 1 and net.ipv4.tcp_tw_reuse = 1 This is in fact incorrect. First you should choose one setting or the other not both. tcp_tw_recycle should be considered unsafe for load balancers and other customer facing devices that communicate over a higher latency network and or utilize failover services. This is due to the fact that TIME_WAIT is required in order to deal with packets that arrive for a connection after the same packet has been previously accepted via a retransmit. Setting net.ipv4.tcp_tw_reuse = 1 appears to have resolved our issue. This has passed the limiting factor from the client to the redis server. This issue is difficult to debug due to the fact that while incoming port exhaustion (socket -> accept) will produce a kernel level logged error, ephemeral local port exhaustion creates an application level rather generic could not connect error. We are now investigating other areas this change might benefit! A better solution as far as client -> redis communication is concerned is probably pipelining requests via a single persistent connection. We are looking into this as well. UPDATE: Data is still applicable to concurrency issues, however the root cause here ended up being that the client code was throwing the socket away before properly hanging up on the server. So the socket was left in TIME_WAIT until the timeout period expired. LESSON: When it comes to sockets in TIME_WAIT the issue is most likely caused by crappy TCP socket handling Additionally enabling net.ipv4.tcp_tw_reuse on a development system may cover up poorly implemented protocol and TCP socket level handling :/ http://www.lakitu.us/2011/04/linux-kernel-scaling-ports-and-port-cycling/

            posted on 2013-02-18 09:51 大龍 閱讀(336) 評論(0)  編輯 收藏 引用

            亚洲午夜久久久影院| 久久无码一区二区三区少妇| 99久久精品免费看国产免费| 久久精品无码一区二区三区免费| 久久精品aⅴ无码中文字字幕重口| 久久无码一区二区三区少妇 | 无码乱码观看精品久久| 97精品国产97久久久久久免费| 99久久人妻无码精品系列蜜桃| 久久久久久亚洲精品无码| 狠狠色婷婷综合天天久久丁香| 久久久久AV综合网成人| 久久综合综合久久综合| 久久婷婷久久一区二区三区| 精品久久久久久久无码| 丁香狠狠色婷婷久久综合| 久久99精品国产99久久| 狠狠色婷婷久久一区二区三区| 久久香综合精品久久伊人| 97久久精品无码一区二区 | 国产精品美女久久久久av爽| 久久国产精品一区二区| 国产精品日韩深夜福利久久| 久久久黄片| 一本色道久久HEZYO无码| 久久精品毛片免费观看| 久久99精品国产麻豆宅宅| 久久久精品视频免费观看| 久久亚洲精品国产亚洲老地址| 亚洲乱码中文字幕久久孕妇黑人 | 国产成人精品久久亚洲高清不卡| 国产精品熟女福利久久AV| 久久免费国产精品| 无码精品久久久久久人妻中字 | 亚洲国产欧美国产综合久久| 国产情侣久久久久aⅴ免费| 久久国产精品免费一区| 一本久久a久久精品vr综合| 狠狠色丁香久久婷婷综| 久久综合色老色| 国产成人久久激情91|