今日大事记之mysql cache和bzm - Concurrency Thread Group

今日大事记之mysql cache和bzm - Concurrency Thread Group

背景

昨天用fiddler抓包转为jmeter脚本后,今天配置了csv data进行压测。

参考链接:
https://www.jianshu.com/p/c6311f032961

第一滴血

参考

https://www.blazemeter.com/blog/advanced-load-testing-scenarios-jmeter-part-4-stepping-thread-group-and-concurrency-thread

Let’s look at the following scenario:

  • 100 threads
  • 30 minutes Ramp Up Time
  • 10 Ramp-Up Steps
  • 30 minutes holding the target rate

This means that:

  • Every 3 minutes 10 users will be added until we reach 100 users. ( 30 minutes divided by 10 steps equals 3 minutes per step. 100 users divided by 10 steps equals 10 users per step. Totalling - 10 users every 3 minutes).
  • After reaching 100 threads all of them will continue running and hitting the server together for 30 minutes

The Concurrency Thread Group also shows us the test in a real-time preview graph.

Increase imagejmeter concurrency thread group preview paragraph


image

存疑的两点

1、每个request的samples?

2、执行脚本后,多久结束?

第二滴血

压测过程中开了慢查询日志后,发现了慢查询语句,想用explain和profiling分析语句,结果发现多次执行相同的sql,第一次执行的时间与后面执行时间相差巨大。

query cache

首当其冲想到了query cache, 随后用上了各种技巧,诸如:

show variables like '%cache%'
set global query_cache_type=0;
set global query_cache_size=0;
flush query cache;
reset query cache;

问题依旧存在,随后便大量查阅资料,看到dev-mysql的官网介绍说,所用版本的query cache相关系统变量已被弃用。

存疑

既然query cache 都禁掉了,为何还会有cache到?

说到底还是不了解mysql的cache缓存原理,于是各种google,找到了宝:

https://stackoverflow.com/questions/16043943/how-to-disable-mysql-query-caching#

可以算是失败的一天

一来没彻底搞懂jmeter bzm - Concurrency Thread Group

二来没搞懂mysql cache

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 春意是不可战胜的,她会永远地住在你心里。温暖的春意总在撩拨你的心弦,把风送进来,把雨送进来,把花送进来。绿...
    冰夫阅读 212评论 0 0
  • 前天晚上去散步,带着我家汪,她大晚上瞎高兴回家路上跟在我旁边自己东晃晃西瞅瞅跑可快,结果一头撞电线杆子上了,就听见...
    达浪打啦阅读 46评论 0 0
  • 那一个在记忆里可爱的蓝胖子 今天, 9月3日是哆啦A梦的生日。 按原著故事设定, 哆啦A梦将在几十年后的2112年...
    次狼阅读 349评论 0 0
  • 染色体是检测染色体的数目或结构有无异常的方法,对血液病的诊断 治疗 预后及监测复发有很重要的作用!它作为孕期的一...
    MRXd阅读 1,914评论 0 1