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

            大龍的博客

            常用鏈接

            統(tǒng)計(jì)

            最新評論

            Linux kernel scaling: Ports and port Cycling --- 轉(zhuǎn)(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)  編輯 收藏 引用

            亚洲av日韩精品久久久久久a| 久久人妻少妇嫩草AV无码蜜桃| 精品国产日韩久久亚洲| 久久综合给合综合久久| 思思久久好好热精品国产| 亚洲精品无码久久久久久| 国产精品久久久久aaaa| 久久久综合香蕉尹人综合网| 性高湖久久久久久久久| 国产一区二区三精品久久久无广告| 色悠久久久久久久综合网| 99热成人精品热久久669| 蜜臀久久99精品久久久久久| 亚洲AV日韩AV天堂久久| 天天影视色香欲综合久久| 久久99精品久久久久子伦| 久久精品无码av| 久久免费美女视频| 老色鬼久久亚洲AV综合| 午夜精品久久久久久影视777| 九九精品99久久久香蕉| 久久亚洲国产精品成人AV秋霞| 国产91久久综合| 久久91精品国产91久久户| 天堂久久天堂AV色综合| 中文字幕精品久久| 国产精品熟女福利久久AV| 88久久精品无码一区二区毛片 | AV狠狠色丁香婷婷综合久久| 亚洲国产成人久久笫一页| 91亚洲国产成人久久精品网址| 久久青青草原亚洲av无码app| 久久综合鬼色88久久精品综合自在自线噜噜 | 精品久久久久一区二区三区 | 亚洲成色WWW久久网站| 亚洲欧美精品一区久久中文字幕| 国产福利电影一区二区三区,免费久久久久久久精 | 色天使久久综合网天天| 色诱久久av| 一本久久a久久精品vr综合| 久久久久国产日韩精品网站|