免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: xfsoul
打印 上一主题 下一主题

[FreeBSD] 精通polling参数调优的进来帮帮忙吧 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2006-05-25 08:54 |显示全部楼层
Before you modify the value, use sysctl -a |grep mbuf to check the mbuf utilization. According to TCP/IP Illustrated Vol.2, bigger packets uses not only mbuf, but also mbufclusters.

论坛徽章:
0
2 [报告]
发表于 2006-05-25 08:56 |显示全部楼层
原帖由 雨丝风片 于 2006-5-25 08:53 发表



改这个里面的:
/usr/src/sys/sys/param.h

I think modify the source file is finding trouble.
Simply recompile the kernel with this

  1. options MSIZE=512
复制代码

in your kernel configuration file.

论坛徽章:
0
3 [报告]
发表于 2006-05-25 09:36 |显示全部楼层
原帖由 雨丝风片 于 2006-5-25 09:08 发表


楼主测试的数据包大小是确定的,改这个值就是想尽量避免使用cluster,看看从对纯mbuf的处理和对cluster的处理流程上是否能找到一些线索。但我感觉应该不只是处理流程的区别,很可能和内存的分配、缓存、复用也 ...

According to the statistics posted out, the mbufclusters must have been used. But I doubt that this statistics was not gathered when running the benchmark, so perhaps it's not very useful.

[ 本帖最后由 antijp 于 2006-5-25 09:46 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2006-05-25 10:24 |显示全部楼层
原帖由 雨丝风片 于 2006-5-25 09:47 发表


从楼主的数据长度即可判断出测试的时候肯定会使用cluster了:

当然,由于mbuf头结构的修改,目前的门限数值比208还要小。现在就是想先看看它不用cluster的时候的测试性能如何。

Less than 208? I've traced the code. sizeof(m_hdr) == 24, sizeof(pkthdr) == 24, without m_ext, the maximum size of the data can be stored is 208. These number is when you are running on i386.
I'm running amd64, so the calculation may be incorrect, and under amd64 sizeof(m_hdr)==sizeof(pkthdr)==40, it's so depressing...:em12:

论坛徽章:
0
5 [报告]
发表于 2006-05-25 12:16 |显示全部楼层
Now I'm building 6.1 on another i386 machine, I'll check the size later.

论坛徽章:
0
6 [报告]
发表于 2006-05-25 12:41 |显示全部楼层
I've checked the two sizes, sizeof(pkthdr) == sizeof(m_hdr) == 24, and sizeof(m_ext) also equals to 24.
MINCLSIZE is 209. This design removes a indirect pointer and would make performance better.

论坛徽章:
0
7 [报告]
发表于 2006-06-24 21:50 |显示全部楼层
对了,楼主试试看把kern.polling.idle_poll置1看看,另外同时最好不要运行其他的应用
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP