• <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 大龍 閱讀(337) 評論(0)  編輯 收藏 引用

            久久青青国产| 天天躁日日躁狠狠久久| 久久伊人精品青青草原日本| 久久久久久久波多野结衣高潮 | 77777亚洲午夜久久多喷| 久久av高潮av无码av喷吹| 思思久久99热只有频精品66| 国产精品久久永久免费| 久久人妻无码中文字幕| 亚洲综合久久综合激情久久| 久久综合亚洲色一区二区三区| 亚洲欧美精品伊人久久| 久久久精品2019免费观看| 伊人久久无码精品中文字幕| 97精品国产97久久久久久免费| 久久久久久亚洲精品成人| 久久亚洲中文字幕精品一区| 九九久久99综合一区二区| 久久久久亚洲av综合波多野结衣 | 亚洲日韩欧美一区久久久久我| 久久久久成人精品无码中文字幕| 青青久久精品国产免费看| 国产精品丝袜久久久久久不卡| 亚洲国产美女精品久久久久∴| 伊人久久大香线蕉综合网站| 精品久久久久中文字| 国产一区二区精品久久岳| 99久久婷婷国产一区二区| 国产精品久久久久久搜索| 久久超碰97人人做人人爱| 久久精品亚洲日本波多野结衣| 亚洲AV无码成人网站久久精品大| 久久久亚洲精品蜜桃臀| 亚洲国产高清精品线久久| 欧美激情精品久久久久久久 | 少妇久久久久久久久久| 精品久久久久久中文字幕大豆网| 久久久久久久久久久| 精品熟女少妇av免费久久| 精品久久久久久国产| 99久久成人18免费网站|