免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3974 | 回复: 7
打印 上一主题 下一主题

[proxy] Traffic server 性能如何 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-10-26 15:14 |只看该作者 |倒序浏览
各位xdjm,大家有在实际坏境中使用过traffic server,不知道性能如何啊?
这两天我测试traffic和squid,用ab进行压力单页面测试,ts和squid都是命中内存cache,测试结果却是,并发越高,traffic的性能和squid的差距越大。

论坛徽章:
0
2 [报告]
发表于 2012-10-26 16:51 |只看该作者
traffic的性能和squid的差距越大。是TS是好呢还是坏的那个?

TS在国内最大的用户是阿里(淘宝)和新浪。

作cache/proxy测试,建议用TS自带的一个压测工具jtest,我刚简单写了一个README放上去:
https://git-wip-us.apache.org/re ... 7d98dc7d9be592333a8

FYI

论坛徽章:
0
3 [报告]
发表于 2012-10-30 15:14 |只看该作者
感觉相同的请求量服务器负载会低一些,但会出现miss的情况。

论坛徽章:
0
4 [报告]
发表于 2012-10-31 17:14 |只看该作者
回复 2# aaaaaa
squid比traffic好,这也是我觉得比较奇怪的地方

论坛徽章:
0
5 [报告]
发表于 2012-11-01 01:32 |只看该作者
squid性能好,应也不奇怪,ab压测是单URL测试,TS不见的有优势,因为一个url的测试,在处理模式上squid的单线程机制反而有更大的优势。而TS的多线程涉及的锁以及调度开销啥的,就代价大了。

你要跑出多线程的效果,才能体现出TS的优势。建议测试工具用我们改过的http_load或上面说的jtest。在TS的代码库里有这两个工具。原版标准的http_load压TS也吃力,我们改的http_load狂吃内存来提高效率,才稍微可用一些。

FYI

论坛徽章:
0
6 [报告]
发表于 2012-11-05 17:44 |只看该作者
你们没用Web Polygraph来测试,这个应该更公平吧!谈谈大家都用什么工具测试?

论坛徽章:
0
7 [报告]
发表于 2012-11-05 18:08 |只看该作者
我们自己作性能测试的测试工具以前用http_laod,正在计划逐步转向TS原生设计的jtest。Web Polygraph真心没用过,不知道性能如何。

论坛徽章:
0
8 [报告]
发表于 2012-11-06 10:15 |只看该作者
真心觉得还不错啊! 提供PGL配置语言,功能强大,贴一段配置分享下:

// this is just one of the simplest workloads that can produce hits
// never use this workload for benchmarking

string user_agent_value1 = "IE";       
string user_agent_value2 = "CHROME";       

/////////////////////////////////////////////////////////////////////////////////////////////////////////
//MP4
/////////////////////////////////////////////////////////////////////////////////////////////////////////
Content MP4_value1= {
        kind = "HTTP_MP4_value1"; // just a label
        mime = { type =  undef(); prefixes = ["MP4_value1_pgclient/"]; extensions = [ ".mp4" ]; };
        size = exp(5MB);
        cachable = 100%;
        user_agent = user_agent_value1;
        //add_header = add_headers_value1;
};

Content MP4_value2= {
        kind = "HTTP_MP4_value2"; // just a label
        mime = { type =  undef(); prefixes = ["MP4_value2_pgclient/"]; extensions = [ ".mp4" ]; };
        size = exp(5MB);
        cachable = 100%;
        user_agent = user_agent_value2;
        //add_header = add_headers_value2;
};

//ips
//addr[] srv_ips =['127.0.0.1:8001'];
//addr[] rbt_ips =['127.0.0.1' ** 10];
addr[] srv_ips =['172.134.1-10.1-145:8001', '172.170.1-10.1-145:8001'];
addr[] rbt_ips =['172.133.10-19.1-110'];

// a primitive server cleverly labeled "S101"
// normally, you would specify more properties,
// but we will mostly rely on defaults for now
Server S = {
        kind = "S101";        
        contents = [ MP4_value1: 60%, MP4_value2: 40% ];
        direct_access = contents;
        addresses = srv_ips; // where to create these server agents
};

// a primitive robot
Robot R = {
        kind = "R101";
        pop_model = { pop_distr = popUnif(); };
        recurrence = 40%; //
        req_rate = 1/sec; //tps

        origins = S.addresses;      // where the origin servers are
        addresses = rbt_ips; // where these robot agents will be created
};

/* working set capacity */
working_set_cap(48933);

/* phases (note that load is kept at constant level) */
time ExpDur = 4000hour; // experiment duration
Phase phases1 = {
        name = "phases1";
        goal.duration = 10% * ExpDur;
};

Phase phases2 = {
        name = "phases2";
        goal.duration = ExpDur - phases1.goal.duration; // the rest of the run
};
schedule(
        phases1, phases2
);

// commit to using these servers and robots
use(S, R);


客户端和服务器端多ip模拟,加header,修改user-agent;URL据work_set中的URL集合按照重复率recurrence = 40%构造request:http://host/MP4_value1_pgclient/w19fa92dc.44827bae:00001438/t03/_00000001.mp4,
working_set_cap(48933)这个设置稳定命中率。schedule能模拟高峰低谷的情况。

我没用过jtest,不清楚有什么样的测试方案!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP