Construction of TPCC-UVA test environment and result analysis
Source: Internet
Author: User
TPCC-UVA test environment construction and result Analysis I. preparation of the operating system: Linux, kernel version 2.6 requires software: tpccuva-1.2.3, postgresql-8.1.15, gnuplot-4.2.5. Tccuva is a standard TPC-C implementation. Postgresql is the most stable open-source SQL database. Gunpl .. TPCC-UVA test environment setup and result Analysis I. prepare the operating system: Linux, kernel version 2.6 requires software: tpccuva-1.2.3, postgresql-8.1.15, gnuplot-4.2.5. Tccuva is a standard TPC-C implementation. Postgresql is the most stable open-source SQL database. Gunplot is a mathematical software that can draw corresponding function graphs based on data. II. Installation 1. create user [root @ RedHat/] # useradd-m tpcctest [root @ RedHat/] # passwd tpcctest (self-created password) log on to the system as tpcctest [root @ RedHat/] # su tpcctest [tpcctest @ RedHat/] $ create the relevant directory tpcctest @ linux:> mkdir $ HOME/tpcc-uvatpcctest @ linux:> mkdir $ HOME/tpcc-ultraviolet A/pgsqltpcctest @ linux:> mkdir $ HOME/tpcc-ultraviolet A/bin2. install PostgreSQL1) run the following command to install the PostgreSQL database tpcctest @ linux:>. /configure -- prefix = $ HOME/tpcc-ultraviolet A/pgsqltpcctest @ linux:> gmaketpcctes T @ linux:> gmake install2) modify the PATH and LD_LIBRARY_PATH environment variables. 3) edit ~ /. In the bash_profile file, add PATH =/usr/local/pgsql/bin: $ PATHLD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/pgsql/libexport PATH LD_LIBRARY_PATH4 to execute the following command, make the modified environment variables take effect. Tpcctest @ linux:> source ~ /. Bash_profile5) enter the following command to check whether the modification of environment variables takes effect. tpcctest @ linux:> if which initdb is modified correctly, the following information is output: $ HOME/tpcc-ultraviolet A/bin/initdb6) start PostgreSQLtpcctest @ linux:> initdb-D $ HOME/tpcc-ultraviolet/pgsql/datatpcctest @ linux:> postmaster-D $ HOME/tpcc-ultraviolet/pgsql/data> log. out 2> log. err & execute the preceding command to start PostgreSQL every time the system is restarted. 7) modify the PostgreSQL parameter $ HOME/tpcc-ultraviolet A/pgsql/data/postgresql. conf replace # checkpoint_segments = 3 # in logfile segments (16 MB each) and min 1 with checkpoint_segments = 10 # in logfile segments (16 MB each ), in min 1, replace # checkpoint_timeout = 300 # in seconds, range 30-3600 with checkpoint_timeout = 3600 # in seconds, range 30-3600 8) to force PostgreSQL to re-read the configuration file tpcctest @ linux:> killall-HUP postmaster 3. install gnuplot, decompress gnuplot, and enter the gnuplot Run the following command to install tpcctest @ linux:>. /configure -- prefix = $ HOME/tpcc-ultraviolet A/bin -- without-xtpcctest @ linux:> maketpcctest @ linux:> make install 4. install tpcc-ultraviolet. put the installation package of tpcc-ultraviolet A in the $ HOME/tpcc-ultraviolet A directory, decompress the package, and run the following command to install tpcctest @ linux:> maketpcctest @ linux:> make install 3. run the $ HOME/tpcc-ultraviolet A/bin/ghost command using tpcc-ultraviolet A test to run the tpcc-ultraviolet a test tool. After the test tool is started, a maximum of eight options can be selected. 1. option 1 Create a New Test Database (Create a New Test Database) This option allows users to Create a New Database for tpcc-ultraviolet a testing, fill in the newly created tpc-ultraviolet a test project as needed. If this option does not appear, the database has been created and the new database is stored in the $ HOME/tpcc-ultraviolet A/pgsql/data Directory. With this option selected, the program will ask the database to contain several data warehouses. The number of data warehouses is 1 ~ In the range of 100. The more data warehouses, the higher the test pressure. Note: too many data warehouses may cause test failure. For PCs, the number of data warehouses is generally 1, and the number of machines with strong processing capabilities can increase accordingly. Each data warehouse occupies MB of space. 2. Option 2 Restore Existing Database (Restore an Existing Database) this option revokes the modifications made to the Database by the test software during the test. this option only appears after the Database is created. If the recovered database is used for testing, the test result may be worse than that of the new database. On the other hand, restoring a database takes much less time than creating a new database. It is generally recommended to use The recovered database for a preliminary Test. 3. The option 3Run The Test (start Test) starts The performance Test. This option only appears when a database is created or recovered. The program will ask the user about the parameters used for testing. These parameters include: Number of warehouses (Number of data warehouses): This Number should be less than or equal to the Number of data warehouses in the database. Number of terminals per warehouse (Number of terminals per data warehouse): The TPC-C official specification specifies that this Number should be 10, if used for preliminary testing we recommend this Number should be less than 10. Ramp-up period (start time): The terminal process is enabled within the start time. After this period of time, the performance will be stable, which is more accurate to start testing. The typical start time should be set to 20 minutes. Measurement period (test time): During this period, the test tool measures the system performance. TPC-C specifies that this cycle should last 2 hours ~ 8 hours. After all the parameters are correctly set, the program will remind you whether to clean up during the test. Cleaning can reduce the residual information generated by the database. excessive residual information may affect the testing performance. For an 8-hour test, it is best to perform cleanup once every 60 minutes. The number of cleanup Times is less than 6. 4. Option 4: Check Database Consistency (Check Database Consistency) after confirmation, the test starts after the Database Consistency is checked. If the check for a table fails, the program will ask the user to confirm and continue processing. Although it can still be processed after an error, it is still strongly required to restore or reconstruct the database in case of an error. 5. Option 5 Delete Database (Delete Database) Delete an existing Database 6. Option 6 Perform Data Analysis (execute Data Analysis) This option allows the program to analyze the test result Data. All information, including checkpoint files and cleanup information, is displayed on the screen. The information displayed on the screen and the files used to generate performance analysis images are saved in the current path. After the display is complete, print a message on the screen to notify the user whether the test has passed. 7. Option 7 Check Database State (Check Database status) this option checks the number of rows of the Database and tells the user the information obtained. This information is used to determine whether the database has been used in the previous test. If you have used the database, you can delete it and create a new database, or restore it and continue to use it. 8. Option 8 Quit (exit): exit the test program. The created database will be retained for the next time. 4. View test results 1. save the test results and enter the main menu. enter option 6 to view the test results. After the test result is output on the screen, the test program prompts whether to save the result. after the file name is input, the result is saved to the file (such as gresult ). Greult stores the general test results and records statistics for each transaction type. In the gresult file, you can see the title "NEW-order transactions:", which is the beginning of the summary of each type of things. During the test, pay attention to the use of capture system information: iostat-xkd 1 20 (1 second capture, 20 times in a row) vmstat 1 20 (1 second capture, 20 times in a row) if the test result is failed, it is of reference significance. note: many files are generated in the current directory, and the data has Reference Significance. for example, the g4.dat file can be used for drawing, data fluctuations and trends can be observed. 2. there must be a drawing script before using gnuplot to draw images using gnuplot. some script templates have been prepared by tpcc-ultraviolet A in the scripts directory in the source code. Script name 561,562,563,564 indicates section 5.6.1, 5.6.2, and so on officially stated by tpcc... 561 draws a response time diagram, 562 draws a comparison between response time and throughput, and 563 draws a think time diagram, 564 shows the throughput rate. Use 561. in gnp, copy the script to the directory where the tpcc result is saved, and then multiply the value of 90th in the gresult statistics by 4 to replace 561. <4x90thPERCENTILE> in gnp. The images generated by Gnuplot are. at the end of the eps, you can use photoshop to open it. v. how to modify the user's home directory in appendix linux: 1. modify the/etc/passwd file and find the lines of the user to be modified. Second, the usermod command
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