DB(SQL)自动压力/负载工具? [英] DB (SQL) automated stress/load tools?

查看:139
本文介绍了DB(SQL)自动压力/负载工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想衡量我的数据库应用程序的性能和可伸缩性.我正在寻找一种工具,该工具将允许我对数据库运行许多SQL语句,并将数据库和脚本(SQL)文件作为参数(+必要的详细信息,例如主机名,端口,登录...).

I want to measure the performance and scalability of my DB application. I am looking for a tool that would allow me to run many SQL statements against my DB, taking the DB and script (SQL) file as arguments (+necessary details, e.g. host name, port, login...).

理想情况下,它应该让我控制参数,例如模拟客户端的数量,测试持续时间,将变量随机化或从列表中进行选择(例如SELECT FROM ... WHERE value = @var,其中var是从命令行读取或随机化的)每次执行).我想测试结果以保存为CSV或XML文件的形式进行分析和绘图.当然,就价格而言,我更喜欢免费"或演示":-)

Ideally it should let me control parameters such as number of simulated clients, duration of test, randomize variables or select from a list (e.g. SELECT FROM ... WHERE value = @var, where var is read from command line or randomized per execution). I would like to test results to be saved as CSV or XML file that I can analyze and plot them. And of course in terms of pricing I prefer "free" or "demo" :-)

令人惊讶的是(至少对我来说),尽管有数十种用于Web应用程序负载测试的工具,但我找不到用于DB测试的工具!我确实看到的那些对象(例如pgbench)使用基于某些TPC方案的内置DB,因此它们可以帮助测试DBMS配置和硬件,但我无法测试MY DB!有什么建议吗?

Surprisingly (for me at least) while there are dozens of such tools for web application load testing, I couldn't find any for DB testing!? The ones I did see, such as pgbench, use a built-in DB based on some TPC scenario, so they help test the DBMS configuration and H/W but I cannot test MY DB! Any suggestions?

虽然我可以使用满足这些要求的任何DB通用工具,但具体来说,我在Linux上使用Postgres 8.3.硬件具有32GB的RAM,而主表和索引的大小约为120GB.因此,冷高速缓存运行与热高速缓存运行(I/O与RAM)之间的响应时间比例可以为1:10.实际上,我希望请求能够平均分配,因此对数据库的不同部分测试查询对我来说很重要.

Specifically I use Postgres 8.3 on Linux, though I could use any DB-generic tool that meets these requirements. The H/W has 32GB of RAM while the size of the main tables and indexes is ~120GB. Hence there can be a 1:10 response time ratio between cold vs warm cache runs (I/O vs RAM). Realistically I expect requests to be spread evenly, so it's important for me to test queries against different pieces of the DB.

也可以通过电子邮件与我联系. 谢谢!

Feel free to also contact me via email. Thanks!

-Shaul Dar(info@shauldar.com)

-- Shaul Dar (info@shauldar.com)

推荐答案

JMeter 来自Apache的服务器可以处理不同的服务器类型.我将其用于针对Web应用程序的负载测试,团队中的其他人将其用于数据库调用.可以通过多种方式对其进行配置,以获取所需的负载.它可以在控制台模式下运行,甚至可以使用不同的客户端进行群集,以最大程度地减少客户端开销(从而篡改结果).

JMeter from Apache can handle different server types. I use it for load tests against web applications, others in the team use it for DB calls. It can be configured in many ways to get the load you need. It can be run in console mode and even be clustered using different clients to minimize client overhead ( and so falsifying the results).

这是一个Java应用程序,乍一看有点复杂.但是我们仍然喜欢它. :-)

It's a java application and a bit complex at first sight. But still we love it. :-)

这篇关于DB(SQL)自动压力/负载工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆