Linux内核协议栈 NAT性能优化之FAST NAT

各位看官非常对不起,本文是用因为写的,如果多有不便敬请见谅
代码是在商业公司编写的,在商业产品中也不能开源,再次抱歉
This presentation will highlight our efforts on optimizing the
Linux TCP/IP stack for providing networking in an
OpenStack environment, as deployed at our industrial customers.
 
 
Our primary goal is to provide a high-quality and highly performant TCP/IP stack.
To achieve this, we have to identify the performance bottlenecks in
the Linux TCP/IP stack for networking in OpenStack. We have performed a lot of
Linux TCP/IP stack performance tuning, related to NIC, CPU cache hit rate, spin lock,
memory alloc and others. However, we learned while measuring that conntrack NAT
uses too much CPU such for instance for the ipt_do_table function.
Linux conntrack is very good, but it is too heavy and many functions are not used.
Instead, we implemented FAST NAT in the Linux TCP/IP stack.
 
 
We will present our efforts on reducing the performance costs.
First, FAST NAT uses spin lock instead of global connection table but the entry to greatly reduces the CPU waiting time,
and user policies is instead stored as a hash table not a list. The connection table and user
policy is per-NUMA, this would avoid CPU through QPI waste much time and increase delay.
Second, FAST NAT does not record the TCP status,
but only record a tuple with relevant connection formation for NAT forward.
This can reduce much check for forwarding packet.
Entry in the connection table can be set to expire on
an absolute expiration time or relative expiration time basis.
Relative expiration time will incresae by per forwarding packet.
Global connection table don't synchronize for reducing lock's using. This may casue one TCP stream in
per-NUMA connection table. If we use Intel Ixgbe NIC with Flow Director ATR mode, the incoming
stream and outcoming stream will have same index for multiple queues. The mentioned limit above
will disappear.
 
Limitations of FAST NAT only TCP and UDP are supported.
Although some limitations exist, our work has paid off and resulted in 15-20 percentage pps improvement.

 

转载于:https://www.cnblogs.com/scottieyuyang/p/5816168.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/403165.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

canvas文字居中;canvas画布文字右对齐;canvas画布文字左对齐;canvas文字自动换行;canvas设置行间距;

canvas参考手册 场景:画布绘制文本,使用 context.fillText(text,x,y,maxWidth)。文本对其也就是设置xy坐标问题。 以下的画布设定宽度假设都是width:500 一、canvas文本左对齐: 就是x轴设置为0即可。 var cdocument.getElementBy…

与朱元思书

风烟俱净,天山共色。从流飘荡,任意东西。自富阳至桐庐一百许里,奇山异水,天下独绝。 水皆缥碧,千丈见底。游鱼细石,直视无碍。急湍甚箭,猛浪若奔。 夹岸高山,皆生寒树,负…

nginx 405 not allowed问题的解决

From: http://www.cnblogs.com/mingaixin/p/4285329.html Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。 例1:用Linux下的curl命令发送POST请求给Apache服务器上…

php判断 二维数组中 是否 存在某个一维数组

<?php $arrs array (array (286,127.0.0.1 ),array (287,127.0.0.1 ),array (288,127.0.0.1 ),array (289,127.0.0.1 ) );$row array (289,127.0.0.1 );foreach ( $arrs as $arr ) {if(!judgeEqual($arr,$row)){echo 123;}//print_r ( $arr ); }//使用数组的差集来判断…

Linux文件去掉^M

1. 直接用 vim 编辑器打开文件&#xff0c;然后把字符串 "^M" 替换成空的就可以了。命令如下&#xff1a; 输入 &#xff1a; 号进入底行模式&#xff0c;然后输入&#xff1a; %s/\r//g &#xff0c;再 Enter 就可以了。 2. 使用现成的工具。命令如下&#xff1a; …

el-cascader回显失败;el-cascader回显不出来

—我的是省市联动&#xff0c;选择时候是正常的&#xff0c;得到的绑定值是数组 [‘安徽’,‘黄山’]&#xff0c;没问题&#xff1b; 但是在详情查看时候&#xff0c;回显成[‘安徽’,‘黄山’]&#xff0c;下拉框却不显示回显值。 —原因&#xff1a;虽然data里初始化声明变量…

No grammar constraints (DTD or XML schema).....两种解决方法

From: http://www.cnblogs.com/yqskj/archive/2013/01/11/2857065.html 方法一&#xff1a;常用方法 关闭XML验证 工具栏&#xff1a;windows > preferences > xml > xml files > validation > Indicate when no grammar is specified:选择Ignore即可。 方法二…

cursor管理

使用cursor的时候需要注意在使用完之后将其关闭&#xff0c;什么时候关闭也是一个需要注意的问题&#xff0c;稍不小心就可能会出错。我们自己管理cursor可能不是那么容易&#xff0c;问题出现这个或那样的问题&#xff0c;Android系统提供了一套curosr的管理&#xff0c;下面让…

数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化

需求&#xff1a;数字金额&#xff0c;按照三位一个逗号显示。既 千 百万 十亿 或者是按照固定的几位一个逗号展示。 方法1&#xff1a; <script type "text/javascript">//保留三位小数&#xff0c;toLocaleString() 方法可把一个 Number 对象转换为本地格…

学习java的经典书籍

《java编程思想》 《Java编程思想(第4版)》书共22章&#xff0c;包括操作符、控制执行流程、访问权限控制、复用类、多态、接口、通过异常处理错误、字符串、泛型、数组、容器深入研究、Iava’UO系统、枚举类型、并发以及图形化用户界面等内容。这些丰富的内容&#xff0c;包含…

项目管理软件伙伴https://www.huobanyun.cn/

现在项目管理软件市面上很多&#xff0c;但能够完全适合每家公司需求的比较难找&#xff0c;因为众口难调&#xff0c;每家公司都有自己的特殊情况&#xff0c;所以&#xff0c;建议考虑下有比较齐全的基础功能的标准化软件产品&#xff0c;同时又在项目管理开发能力上比较突出…

eclipse配置

eclipse 算是跨平台的开发工具了&#xff0c;而且使用的人群很多&#xff0c;虽然网上有很多答案&#xff0c;但我还是想整理下自己的答案&#xff0c;方便日后查询&#xff1a; 1. 编码设置 2. 解决No grammar constraints (DTD or XML schema) 3. [WARNING] Using platform …

el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;

场景&#xff1a;本文是两种表单校验 1.对于数组for循环&#xff0c;校验每一项 2.对于两个不同的字段&#xff0c;分别v-if显示隐藏的校验 一、新增和删除表单项&#xff0c;动态校验。 el-form表单动态动态新增表单进行校验。直接参考 动态增减表单项 以下代码可直接复制&…

MT7628如何控制GPIO

查看datasheet和确认GPIO复用引脚scheme 通过查看mt7628 datasheet可以明确复用关系&#xff1a; 在这里我以I2S对应的GPIO引脚为例。 查看 mt7628an.dtsi 文件中对gpio的注册 $(TOPDIR)假定为宿主机上 OpenWrt 的编译目录。 在$(TOPDIR)/target/linux/ramips/dts/mt7628an.d…

.Net Core集成Office Web Apps(一)

最近开始学习.Net Core&#xff0c;并使用Visual Studio Code工具来开发。感觉开发起来特别的方便&#xff0c;但是有个头疼的地方&#xff1a;许多的类库被修改了&#xff0c;一时半会儿还熟悉不了&#xff0c;需要查阅官方API。。。 Microsoft Office Web Apps&#xff08;以…

Unhandled event loop exception Item not added

win7_x64 eclipse&#xff0c;老是出现如题的问题&#xff0c;太烦了。上网一搜&#xff0c;好多人说是杀毒软件的问题。 我把360关了&#xff0c;问题依旧&#xff0c;再把ADSafe关掉&#xff0c;问题解决了。所以还是不要装一些乱七八糟的东东了&#xff0c;eclipse不喜欢&a…

el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。

需求&#xff1a;正常我们上传都是一个固定的文件传到固定的后端字段里去。 但是有可能遇到&#xff0c;这种自定义新增多个上传组件&#xff0c;也就是遍历数组似的多个同样的上传组件 此时就遇到一个问题&#xff1a;因为是遍历出来的上传组件&#xff0c;导致上传成功:on-su…

openwrt gpio控制与使用

查看datasheet和确认GPIO复用引脚scheme 通过查看mt7628 datasheet可以明确复用关系&#xff1a; 在这里我以I2S对应的GPIO引脚为例。 查看 mt7628an.dtsi 文件中对gpio的注册 $(TOPDIR)假定为宿主机上 OpenWrt 的编译目录。 在$(TOPDIR)/target/linux/ramips/dts/mt7628an.d…

git 配置图形比较工具

2019独角兽企业重金招聘Python工程师标准>>> 以meld为例&#xff0c;安装方式是sudo apt-get install A. 在/usr/local/bin 目录下创建extDiff 文件(注意: 目录可以是任意) cd /usr/local/bin sudo gedit /usr/local/bin 内容为: #!/bin/bash /usr/bin/meld "$…