Swingbench character mode pressure measurement best practices

Source: Internet
Author: User
Tags benchmark time 0

Previously, the use of swingbench for the performance stress test of Oracle RAC DB was used in the most basic and intuitive graphical mode to meet most requirements.

However, in some scenarios, the graphics mode may itself consume too much resources, especially when generating a large amount of test data, it is likely due to the instability of the graphics itself caused by the death of the card or even direct exit, seriously affecting the efficiency and testing experience.
In the case of silent mode, the direct use of XML editing is not a good way to confirm the correct change.
This article mainly introduces the little tricks I found when I was doing a stress test.

    • 1. Generate Pressure measurement data
    • 2. Perform stress tests
1. Generate Pressure measurement data

Before using the graphical interface, we went directly to execute./oewizard can invoke the graphical interface to configure the final generation of the data for the stress test in the prompt step-by-step configuration.

In the case of character mode, you need to specify the parameter configuration file and some necessary parameters to see what parameters are available first:

[[email protected] bin]$./oewizard-husage:parameters:-allindexes Build all indexes for Schema-bigfil E use big file tablespaces-c <filename> Wizard config file-cl run in  Character Mode-compositepart use a composite paritioning model if it exisits-compress use default  Compression model If it exists-create create benchmarks Schema-cs <connectString> connectring For DATABASE-DBA <username> dba username for schema creation-dbap <password> password for SC Hema Creation-debug turn on debugging OUTPUT-DEBUGF turn on debugging output to file (d Ebug.log)-df <datafile> datafile name used to create schema In-drop drop benchmarks Sch                EMA-DT <driverType> driver Type (oci|thin)-G run in graphical mode (default)-generate GenerateData for benchmark if available-h,--help print this message-hashpart use hash paritioning mo del if it exists-hcccompress use HCC compression if it exisits-nocompress don ' t use any database Compression-noindexes don ' t build any indexes for Schema-nopart don ' t use any database part  Itioning-normalfile use normal file tablespaces-oltpcompress use OLTP compression if it exisits-p <password> password for benchmark Schema-part Use default paritioning model if it Exis  Ts-pkindexes only create primary keys for Schema-rangepart use a range paritioning model if it Exisits-s run in silent Mode-scale <scale> mulitiplier for default CONFIG-SP <s OFT partitions> the number of softparitions used. Defaults to CPU COUNT-TC <thread count> the number of THreads (parallelism) used to generate data.  Defaults to Cpus*2-ts <tablespace> tablespace-to-Create schema In-u <username> username for Benchmark Schema-v run in verbose mode while running from command line-vers  Ion <version> version of the benchmark to run[[email protected] bin]$

Actually I test here, the parameters used are-CL,-create,-C,-scale,-TC,-part
Where-CL,-create is required;-C is to specify an XML configuration file,-scale refers to the amount of pure data (is the default 1G configuration of how many times),-TC refers to the degree of parallelism,-part refers to the partition.

./oewizard -cl -create -c oewizard.xml -scale 150 -tc 64 -part

And about oewizard.xml This configuration file, I only changed the following part of the content, the others remain unchanged:

<DefaultParameters>   <Parameter Key="datatablespacesexists" Value="true"/>   <Parameter Key="password" Value="soe"/>   <Parameter Key="username" Value="soe"/>   <Parameter Key="datafile" Value="+DATA"/>   <Parameter Key="userexists" Value="true"/>   <Parameter Key="connectionstring" Value="//db50/jyzhao"/>   <Parameter Key="connectiontype" Value="thin"/>   <Parameter Key="onlydropuser" Value="false"/>   <Parameter Key="operation" Value="create"/>   <Parameter Key="tablespace" Value="SOE"/>   <Parameter Key="dbausername" Value="sys as sysdba"/>   <Parameter Key="dbapassword" Value="oracle"/>   <Parameter Key="output" Value="Verbose"/></DefaultParameters>

The main thing is to confirm the test user and password, as well as the creation location of the data file, database connection string, database sys user and password these items.
The trick is that if you do not confirm that your profile is written correctly, you can do this first, bring in the corresponding parameters, call the graph to go through the check under all configurations:

./oewizard -c oewizard.xml -scale 150 -tc 64 -part

After confirming the error, I am here because the amount of data generated is very large, the bare data is 150G, which is not counted. So take the background execution and record a time before and after execution:

--1.生成压测数据脚本$ cat test150.sh dateecho "=====Begin====="./oewizard -cl -create -c oewizard.xml -scale 150 -tc 64 -partecho "=====End====="date--2.后台执行,输出日志nohup sh test150.sh > test150.log &--3.跟踪日志输出tail -20f test150.log

It took nearly 4 hours to complete the final generation:

[[email protected] bin]$ tail-20f test150.log Fri-10:52:54 CST 2018=====begin=====swingbench Wizardauthor: Dominic gilesversion:2.5.0.971running in Lights out Mode using config file:oewizard.xml=================           ===========================| DataGenerator Run Stats |============================================connection time 0:00:00                         .005Data Generation Time 3:41:44.395ddl Creation time 0:09:00.405total Run time                   3:50:44.809rows Inserted per sec 136,446data Generated (MB) per sec 10.9Actual Rows Generated 1,816,220,694post Creation Validation report=============================== The schema appears to the been created successfully. Valid objects=============valid Tables: ' ORDERS ', ' order_items ', ' CUSTOMERS ', ' warehouses ', ' orderentry_metadata ', ' Inventories ', ' product_information ', ' product_descriptions ', ' AddreSSEs ', ' card_details ' Valid Indexes: ' prd_desc_pk ', ' Prod_name_ix ', ' product_information_pk ', ' Prod_supplier_ix ', ' Prod_category_ix ', ' inventory_pk ', ' Inv_product_ix ', ' Inv_warehouse_ix ', ' order_pk ', ' Ord_sales_rep_ix ', ' ORD_ ' Customer_ix ', ' Ord_order_date_ix ', ' Ord_warehouse_ix ', ' order_items_pk ', ' Item_order_ix ', ' Item_product_ix ', ' Warehouses_pk ', ' Whs_location_ix ', ' customers_pk ', ' Cust_email_ix ', ' Cust_account_manager_ix ', ' CUST_FUNC_LOWER_ Name_ix ', ' address_pk ', ' Address_cust_ix ', ' card_details_pk ', ' Carddetails_cust_ix ' Valid views: ' Products ', ' product_ Prices ' Valid sequences: ' Customer_seq ', ' orders_seq ', ' address_seq ', ' logon_seq ', ' Card_details_seq ' Valid Code: ' OrderEntry ' Schema Created=====end=====fri 14:43:42 CST 2018

It turns out that I added this time at the beginning and end of the execution, some superfluous, and the software has statistics total Run times.

2. Perform stress tests

Using graphical mode, it is directly executed./swingbench then after the configuration is completed, the stress test can directly display the following results:

If you use a character, you need to call the./charbench, valid parameters are as follows:

[[email protected] bin]$./charbench-husage:parameters:-D <variable=value> use value for given ENV Ironment variable-a Run automatically-be <stopafter> end recording Statis Tics after.  Value is in the form HH:MM-BG indicate that charbench'll be run In the Background-bs <startafter> start recording statistics after. Value is in the form hh:mm-c <filename> specify config File-co 

And the most important XML configuration file if manual editing is a very distressing thing, the same technique, the graphical call after the configuration of the parameters and then save as export an XML configuration.
For example, the exported XML configuration file is a simulated 2000 concurrent OLTP type business, the file name is Oltp2000.xml
so the character test can be called directly:

--simply look at the amount of things [[email protected] bin]$./charbench-c oltp2000.xml--Specify one of the machine login information, and see the CPU and I/O load of this machine, and the response time [[ Email protected] bin]$./charbench-c oltp2000.xml-cpuloc db50-cpuuser oracle-cpupass oracle-v ' USERS,CPU,DISK,TP M,tps,resp ' > oltp2000_load50.log[[email protected] bin]$./charbench-c Oltp2000.xml-cpuloc Db52-cpuuser Oracle-cpupass oracle-v ' Users,cpu,disk,tpm,tps,resp ' > oltp2000_ load52.log--the data of quasi-production was not retained at that time, here is the data of my experimental environment (50 concurrency) simply explained below: [[email protected] bin]$ tail-20f oltp2000_load50.log Author : Dominic Gilesversion:2.5.0.971results'll is written to Results.xml.Hit Return to Terminate Run ... Time Users User System Wait Idle Bi Bo TPM TPS response23:19:30 [0/50] 0 0 0 0 0 0 0 0 023:19:33 [0/50] 0 0 0 0 0 0 0 0 023:19:34 [0/50] 11 22 2 65 19 2194 0 0 023:19:35 [0/50] 27 44 0 28 155 1514 0 0 023:19:36 [ 0/50] 8 24 1 67 31 1593 0 0 023:19:37 [12/50] 5 27 2 65 56 2626 0 0 023:19:38 [35/50] 6 11 1 82 39 1152 0 0 023:19:39 [50/50] 8 20 2 71 23 2802 0 0 023:19:40 [50/50] 16 33 0 51 820 1218 43 43 23323:19:41 [50/50] 26 73 1 0 17 80 580 161 118 39023:19:42 [50/50] 45 54 1 0 1833 658 264 103 3 9323:19:43 [50/50] 36 63 1 0 1959 655 384 120 36123:19:44 [50/50] 25 75 0 0 1999 703 487 103 36623:19:45 [50/50] 33 66 1 0 1611 588 563 76 38023:19:46 [50/50] 46 53 1 0 1727 724 650 87 38423:19:47 [50/50] 35 64 1 0 1607 694 766 116 37623:19:48 [50/50] 30 69 1 0 1587 596 852 86 38223:19:49 [50/50] 31 68 1 0 2227 629 945 93 38023:19:50 [50/50] 46 54 0 0 2611 689 1034 89 38523:19:51 [50/50] 35 64 1 0 1763 626 1127 93 38523:19:52 [50/50] 22 76 2 0 2 276 825 1248 121 37923:19:53 [50/50] 29 70 1 0 2195 787 1378 130 37123:19:54 [50/50] 43 55 2 0 2075 767 1490 112 36523:19:55 [50/50] 39 61 0 0 1827 965 1617 127 35923:19:56 [50/50] 29 71 0 0 195 1 646 1715 98 36023:19:57 [50/50] 37 63 0 0 1611 946 1799 84 36523:19:58 [50/50] 45 55 0 0 1671 834 1912 113 36623:19:59 [50/50] 34 66 0 0 1867 705 2023 111 36223:20:00 [50/50] 39 61 0 0 2235 889 2137 114 35823:20:01 [50/50] 40 60 0 0 1931 859 2245 108 35723:20:02 [50/50] 3 6 64 0 0 1866 892 2362 117 35523:20:03 [50/50] 38 62 0 0 2758 734 2450 88 35323:20:04 [50/50] 42 58 0 0 3191 913 2539 89 35123:20:05 [50/50] 47 53 0 0 2451 935 2636 97 35223:20:06 [50/50] 48 52 0 0 2059 652 2725 89 35023:20:07 [50/50] 42 58 0 0 25 75 995 2802 77 34823:20:08 [50/50] 42 58 0 0 2295 658 2868 66 355 

As you can see, the 50 users I tested here [50/50] are soon connected, after the CPU information has 4 columns (User, System, Wait, Idle), I/O information (Bi, Bo) has two columns, the last three columns (TPM, TPS, Response) Is the amount of things per minute, the amount of things per second, the response time.
Of course, I have this test environment here because the configuration is very low, and did not do a special tuning, measured performance data is not very good-looking, just demo with ~

Swingbench character mode pressure measurement best practices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.