search
HomeDatabaseMysql Tutorial使用Swingbench对Oracle数据库进行性能测试

目前网络上开源的oracle压力测试工具主要是orabm和swingbench,由于orabm不支持oracle 11g版本,因此本次测试使用了swingben进行了

相关mysql视频教程推荐:《mysql教程

1,swingben介绍  

目前网络上开源的Oracle压力测试工具主要是orabm和swingbench,由于orabm不支持oracle 11g版本,因此本次测试使用了swingben进行了压力测试。另外,swingbench还能对rac进行测试。swingbench是UK based oracle Database Solutions group开发的一个oracle压力测试工具,好像是官方废弃的一个项目,,官方页面 上可以下载最新的软件版本。

   swingbench可以运行在windows和linux平台,本次测试采用linux平台,具体过程如下
   1,使用oewizard导入测试数据,可以根据过程提示进行数据导入
   2,设置环境变量 java版本要求1.6以上,连接串为10.4.×.×:1521:×
   export PATH=/monitor/agent_12c/core/12.1.0.1.0/jdk/bin/:$PATH
   export DISPLAY=10.6.*.*:0.0
   cd /monitor/swingbench/swingbench/bin/
   3,使用swingbench主页面进行压力测试

2,压力测试结果

服务器类型是IBM X3755M3服务器,配置是4CPU *8core,128G内存。测试结果显示,峰值达到48万TPMC,tps最大接近1万。而此时数据库主机CPU利用率已接近95%

top - 15:26:34 up 6 days, 21:57,  2 users, load average: 189.06, 121.48, 58.92
Tasks: 909 total,  36 running, 873 sleeping,   0 stopped,  0 zombie
Cpu(s): 79.1%us, 12.9%sy,  0.0%ni, 6.5%id,  0.2%wa,  0.1%hi, 1.2%si,  0.0%st
[object Object]

附录:

1.A,swingbench的相关测试参数

swingbench GUI上的users:the number of users(threads) that attach to a database and the amount and tye of work they perform. users can dynamically monitor the response times and load which is displayed in a series of graphs.

这里的users是控制同时连接到oracle的用户数量。我们知道每个连接到oracle的用户都将分配PGA,所以这里应该是理解为并行度。

2. min/max think time: 每个交易之间最小/大的思考时间。如果设置min think time,每个交易之间将间隔规定时间。

3. max trans:如果设置将限制最大的交易数量。

4. 最顶端的transaction面板:load: Indicates the "weight" of the transaction in comparison to othe transactions. A higher weight indicates that it more likely to be run.

这个面板主要是可以取消一些固定的交易类型。load这个栏主要是用于调整整个测试中某些交易的权重。例如:browse product主要是select 语句,可以增加他的权重,表示更多的人查询。

关于oewizard中的几个参数:

Number of Customers: 预加载到数据库表中的用户数量。

Number of Orders:预加载到数据库表中的Orders数量。

整个OE的测试是基于9张表的,那么用oewizard预加载数据量不同,测试结果是不是不同呢?

对oracle自己来说,有索引的表性能在大小一定的时候是不会有什么区别的,但是当表的行数达到一定的程度,例如几个亿行,索引性能还不如全表扫描的性能。因此对于OE所允许的范围,我认为表数据大小对性能影响不会很大。

Swingbench是一个压力测试工具,其结果tpmc也是表示每分钟所能做的交易数量。如果预加载的数据越多,而TX中所有类型的权重固定的 话,需要调整并行users的数量,以取得一个最佳的tpms值。我之前测试的结果来看,并行user固定,预加载的数据越多,得到的tpmc结果越小, 我也有点迷糊了,后来仔细分析了之后才发觉,应该相应修改并行users的数量。

通过修改TX panel里的各个交易类型的权重,也可以得出oracle的一些性能参数,例如查询加重,如果tpmc的值还差不多,说明这个数据库的查询能力还是不错的。

B,TPMC介绍

按照TPC的定义,流量指标描述了系统在执行Payment、Order-status、Delivery、Stock-Level这四种交易的同时,每分钟可以处理多少个New-Order交易。所有交易的响应时间必须满足TPC-C测试规范的要求。

流量指标值越大越好!
TPMC计算依据
为了方便计算数据库服务器的造型,我们约定:

" 系统同时在线用户数为1500人(U1); 
" 平均每个用户每分钟发出2次业务请求(N1);
" 系统发出的业务请求中,更新、查询、统计各占1/3;
" 平均每次更新业务产生3个事务(T1);
" 平均每次查询业务产生8个事务(T2);
" 平均每次统计业务产生13个事务(T3);
" 一天内忙时的处理量为平均值的5倍;
" 经验系数为1.6;(实际工程经验)
" 考虑服务器保留30%的冗余;

服务器需要的处理能力为:

TPC-C=U1*N1*(T1+T2+T3)/3*3*经验系数/冗余系数

则应用服务器的处理性能估算为:

TPC-C= 1500*2*(3+8+13)/3*5*1.6/0.7= 274,285 tpmC

数据库服务器关系到整个系统的稳定运行,考虑到高可靠性和高可用性,并注重设备的可扩展性和性价比,系统将配置两台TPC-C值不小于28万的高性能数据库服务器

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What are some tools you can use to monitor MySQL performance?What are some tools you can use to monitor MySQL performance?Apr 23, 2025 am 12:21 AM

How to effectively monitor MySQL performance? Use tools such as mysqladmin, SHOWGLOBALSTATUS, PerconaMonitoring and Management (PMM), and MySQL EnterpriseMonitor. 1. Use mysqladmin to view the number of connections. 2. Use SHOWGLOBALSTATUS to view the query number. 3.PMM provides detailed performance data and graphical interface. 4.MySQLEnterpriseMonitor provides rich monitoring functions and alarm mechanisms.

How does MySQL differ from SQL Server?How does MySQL differ from SQL Server?Apr 23, 2025 am 12:20 AM

The difference between MySQL and SQLServer is: 1) MySQL is open source and suitable for web and embedded systems, 2) SQLServer is a commercial product of Microsoft and is suitable for enterprise-level applications. There are significant differences between the two in storage engine, performance optimization and application scenarios. When choosing, you need to consider project size and future scalability.

In what scenarios might you choose SQL Server over MySQL?In what scenarios might you choose SQL Server over MySQL?Apr 23, 2025 am 12:20 AM

In enterprise-level application scenarios that require high availability, advanced security and good integration, SQLServer should be chosen instead of MySQL. 1) SQLServer provides enterprise-level features such as high availability and advanced security. 2) It is closely integrated with Microsoft ecosystems such as VisualStudio and PowerBI. 3) SQLServer performs excellent in performance optimization and supports memory-optimized tables and column storage indexes.

How does MySQL handle character sets and collations?How does MySQL handle character sets and collations?Apr 23, 2025 am 12:19 AM

MySQLmanagescharactersetsandcollationsbyusingUTF-8asthedefault,allowingconfigurationatdatabase,table,andcolumnlevels,andrequiringcarefulalignmenttoavoidmismatches.1)Setdefaultcharactersetandcollationforadatabase.2)Configurecharactersetandcollationfor

What are triggers in MySQL?What are triggers in MySQL?Apr 23, 2025 am 12:11 AM

A MySQL trigger is an automatically executed stored procedure associated with a table that is used to perform a series of operations when a specific data operation is performed. 1) Trigger definition and function: used for data verification, logging, etc. 2) Working principle: It is divided into BEFORE and AFTER, and supports row-level triggering. 3) Example of use: Can be used to record salary changes or update inventory. 4) Debugging skills: Use SHOWTRIGGERS and SHOWCREATETRIGGER commands. 5) Performance optimization: Avoid complex operations, use indexes, and manage transactions.

How do you create and manage user accounts in MySQL?How do you create and manage user accounts in MySQL?Apr 22, 2025 pm 06:05 PM

The steps to create and manage user accounts in MySQL are as follows: 1. Create a user: Use CREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password'; 2. Assign permissions: Use GRANTSELECT, INSERT, UPDATEONmydatabase.TO'newuser'@'localhost'; 3. Fix permission error: Use REVOKEALLPRIVILEGESONmydatabase.FROM'newuser'@'localhost'; then reassign permissions; 4. Optimization permissions: Use SHOWGRA

How does MySQL differ from Oracle?How does MySQL differ from Oracle?Apr 22, 2025 pm 05:57 PM

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

What are the disadvantages of using MySQL compared to other relational databases?What are the disadvantages of using MySQL compared to other relational databases?Apr 22, 2025 pm 05:49 PM

The disadvantages of MySQL compared to other relational databases include: 1. Performance issues: You may encounter bottlenecks when processing large-scale data, and PostgreSQL performs better in complex queries and big data processing. 2. Scalability: The horizontal scaling ability is not as good as Google Spanner and Amazon Aurora. 3. Functional limitations: Not as good as PostgreSQL and Oracle in advanced functions, some functions require more custom code and maintenance.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.