zoukankan      html  css  js  c++  java
  • Linux openvswitch性能调优

    Increasing the flow-eviction threshold

    The threshold is a type of limit on the number of flows that are cached in the kernel. OVS will handle as many flows as can be processed through ovs-vswitchd.

    If the number of newly created connections reaches this limit, in a 5 second window, OvS attempts to keep the memory consumption under the limit by evicting older flow entries.

    It is possible to increase this flow-eviction threshold. This is the recommended first step to resolve issues related to the number and frequency of flow entries being created,

    To set the flow-eviction-threshold enter the following:
    ovs-vsctl set bridge <bridgename> other-config:flow-eviction-threshold=<new value>

    To query whether the flow-eviction-threshold was set explicitly:
    ovs-vsctl get bridge <bridgename> other-config:flow-eviction-threshold

    Customers can use the active flow-eviction-threshold value to evaluate the current number of active flows by using the following command:
    watch -n 1 ovs-dpctl show

    This command prints out the bridge statistics every second, until the process is ended.

    The flows counter displays the actual number of current flow entries. If the number of flows approaches the flow-eviction-threshold, OvS has to deal with a lot of flow creations and deletions. In this case increasing the flow-eviction-threshold should help address the issue.

    Increase idleTimeout & hardTimeout

    The idleTimeout is basically a value that determines how long a flow 
    in a switch will last if it doesn't match any traffic.   So if I have 
    a flow in a switch with an idleTimeout of 5 seconds that matches all 
    ICMP traffic on a given switch port, then as long as ICMP traffic is 
    entering that switch port, that flow will continue to exist.  If no 
    ICMP traffic goes through the switch port for 5 seconds, the flow will 
    timeout, and it will be removed from the switch. 

    The hardTimeout, on the other hand, is a hard limit on how long a 
    given flow can exist in the switch.  If I have a flow in a switch with 
    a hardTimeout of 5 seconds that matches all ICMP traffic on a given 
    switch port, then even if ICMP traffic is continuously entering the 
    switch port, that flow will time out after 5 seconds and it will be 
    removed from the switch. 

    "If both idle_timeout and hard_timeout are zero, the entry is 
    considered permanent and will never time out" 

    The idle age is simply how long the flow has not matched any packets. If the idle age is reported at 12, then that means the flow has not matched any packets in 12 seconds. This will be reset automatically back to zero by the switch as soon as the flow matches a packet. The idle age is what triggers an idle timeout if there is an idle timeout set.

  • 相关阅读:
    wcf布到服务器下载文件大小限制问题
    动态修改母版页中的DIV标签中的LI的A的CLASS属性
    c# 分页的方法
    Java学习笔记-异常处理-有风险的行为
    ASP.NET Core中的静态文件
    在ASP.NET Core中进行配置
    ASP.NET Core中的中间件和请求管道
    Kestrel:ASP.NET Core的Web服务器
    ASP.NET Core Program.cs
    ASP.Net Core Startup类
  • 原文地址:https://www.cnblogs.com/scottieyuyang/p/5683656.html
Copyright © 2011-2022 走看看