• <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精品免费观看| 国产高潮国产高潮久久久91| 国产成人无码精品久久久免费 | 69久久精品无码一区二区| 亚洲香蕉网久久综合影视| 成人资源影音先锋久久资源网| 久久综合视频网站| 久久夜色精品国产噜噜麻豆| 久久91这里精品国产2020| 中文字幕久久亚洲一区| 国产精品9999久久久久| 欧美与黑人午夜性猛交久久久 | 久久青青草视频| 色综合久久综精品| 亚洲精品无码久久久久| 久久91这里精品国产2020| 韩国免费A级毛片久久| 久久中文字幕人妻丝袜| 久久97久久97精品免视看秋霞| 久久久久久午夜成人影院| 精品国产乱码久久久久久呢 | 天堂无码久久综合东京热| 99999久久久久久亚洲| 精品国产乱码久久久久软件| 无码任你躁久久久久久老妇| 99久久精品国产综合一区 | 久久久久无码国产精品不卡| 久久久久国产精品熟女影院| 五月丁香综合激情六月久久| 亚洲另类欧美综合久久图片区| 91精品日韩人妻无码久久不卡| 国产精品99久久免费观看| 午夜久久久久久禁播电影| 久久久久亚洲AV成人网人人网站| 色欲综合久久躁天天躁| 色综合久久久久综合99| 色青青草原桃花久久综合| 波多野结衣久久一区二区| 久久人人爽人人爽人人片AV不 | 久久国产精品久久久|