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

            久久精品国产亚洲av日韩| 久久精品国产亚洲av麻豆图片| 亚洲精品无码久久久久去q | 99久久综合狠狠综合久久止| 少妇久久久久久被弄高潮| 久久久精品午夜免费不卡| 国产精品成人久久久久三级午夜电影 | 99麻豆久久久国产精品免费 | 日本一区精品久久久久影院| 国产精品欧美亚洲韩国日本久久| 麻豆久久| 亚洲国产成人久久综合碰碰动漫3d| 久久亚洲2019中文字幕| 久久久精品人妻一区二区三区蜜桃 | 国产精品美女久久久| 久久亚洲中文字幕精品一区四| 久久中文字幕人妻丝袜| 久久综合久久综合九色| 久久九九青青国产精品| 综合久久一区二区三区 | 岛国搬运www久久| 一本久久a久久精品亚洲| 曰曰摸天天摸人人看久久久| 亚洲中文字幕无码久久2017| 欧美亚洲另类久久综合婷婷| 久久国产精品成人免费| 中文字幕日本人妻久久久免费| 国产成人精品久久亚洲高清不卡| 婷婷久久久亚洲欧洲日产国码AV | 久久本道久久综合伊人| 香蕉久久一区二区不卡无毒影院 | 久久这里只有精品18| 久久婷婷色综合一区二区| 欧美午夜精品久久久久久浪潮| 久久精品国产清自在天天线| 久久久久久综合一区中文字幕| 久久ww精品w免费人成| 久久久久亚洲AV无码麻豆| 国产A级毛片久久久精品毛片| 热99RE久久精品这里都是精品免费| 欧美与黑人午夜性猛交久久久|