[Oracle] Using open source tool to realize its own TPC-C

xiaoxiao2021-03-06  66

[Oracle] How to Use Open Source Tools to Implement Your Own TPC-C Author: Fenng Date: Mar 14 2004 (v0.13) site: Http: //www.dbanotes.net

This paper introduces how to use open source tools to implement TPC-C in the Oracle database environment. For DBA, developers, BI implementers have a certain reference value. Introduction Description Imagined this:

You are responsible for the company's OLTP type database project, facing the database server selection: How to choose hardware to meet the business requirements of the product environment? Does this matter are "taking your head" decision?

It is undeniable that the hardware selection is an art, selects the right hardware, can save a large amount of money, choose the server product that cannot meet business needs, not only spend money, will also affect future business. Maybe you will first think of the information of the TPC-C of the server. When mentioned TPC-C, many people may feel familiar and strange, because they often listen to people, but they can say clearly, and there are not many people, and they are not exhausted from everyone. the same. So what is the meaning of TPC / TPC-C? What is TPC? TPC (Transaction Processing Performance Council, Transaction Performance Committee) is a non-profit organization, its official site is at http://www.tpc.org. Its aim is to develop standard specifications of the business application baseline (Benchmark), provide performance and price metrics, and manage the release of test results. It is extremely authoritative in the industry. The Standard Specification of the TPC is a publicly opened, which can be obtained on the official site, but the TPC does not provide the code of the baseline. Any hardware and software manufacturer or other tester can optimally build the system to be tested according to the standard specification. In order to ensure the objectivity of the test results, the testers must be submitted to the TPC set of full reports, including the detailed configuration of the measured system, classification price, and included five-year maintenance costs. Total cost. The report must be verified by the TPC authorized auditor (TPC itself does not do audit). What is TPMC? Let's talk about TPC-C, TPC-C is a baseline program for On-line Transaction Processing, OLTP. TPC-C simulates a wholesaler's cargo management environment. TPC-C uses three performance and price measures, with performance by TPC-C throughput, and units are TPMC. TPM is the abbreviation of Transactions Per Minute; C refers to the C baseline program in the TPC. It is defined as a new order number of system processing per minute. Understand this content, you may think: How do our company's PC servers are all ourselves, how to measure TPC-C? Also refer to the information on the official website of the TPC? Don't forget, the test results published on TPC.org are the results of the major manufacturers based on their own systems. For a few more, the value published by the TPC is like a new Ferrari sports car through the professional technician's careful inspection and maintenance, and then ran out on the dedicated runway, and our situation may be Ferrari (or even Xiali) to be in rural dirt. Drive on the road, which is comparable to a big discount. Some friends will think: Then we can take a stop according to your own situation, tested it on the "rural dirt road" to see it. This means is also obvious, and the actual environment is not more reference value? Yes, this is also the purpose of this article: Let us use the open source tool to implement your own TPC-C for Oracle databases. Hammerora-The Open Source Oracle Load Test Tool first introduces Hammerora. From the creator's title description of this tool, Hammerora is an Oracle database load test tool. This tool can be used on version of Oracle 8i, 9i, and 10g. It is currently available on Linux / UNIX and Windows. It is initially implemented. Hammerora is completely written in GPL copyright. The author is Steve Shaw. The home page of the project is: http://sourceforge.net/projects/hammerora/.

Figure 1: The design principle of Hammerora's logo Hammerora is to resolve Oracle's Trace file and convert them to OratCL programs, and then "play back" with multiple users in the Oracle database. We know that Oracle's Trace file is able to record the user's operation on the database. This Hammerora can ensure true simulation of the user environment. Hammerora was originally used to learn: It is expected to be a certain number of users in the simulated database. Such a small family-based learning development system can be more close to the product environment. This tool has grown into an Oracle database for pressure testing - from a small database to a large RAC-based cluster. The TCL language has been used to provide high-performance and ORACLE database OCI integration without having to recompile the generated program. Each generated program has strict TCL / ORATCL compatibility and can run under the command line shell of Hammerora. The powerful function and flexibility of TCL means that potential features are endless. TCL thread packages are used to implement multiple concurrent connections to the Oracle database. Hammerora contains Oracle stored procedures and TCL drive scripts to run TPC-C baselines. However, we must first build a database that is consistent with the TPC-C specification. This way, we need to use ORABM. ORABM ORABM is a package built by Geoff Ingram (High-Performance Oracle: Proven Methods ForchieVing Optimum Performance and Availability), which contains a set of SQL scripts and several command line programs. ORABM Data Loader (ORABMLOAD) builds a set of data that follows TPC-C standards for testing. ORABM packages and source code can be obtained from its main page http://www.linxcel.co.uk/orabm/. ORABM's running mechanism ORABM's running mechanism has a clear description in Geoff Ingram, which is translated as follows: ORABM works by running the user's execution of database transactions in the concurrent database session specified in each user. Transaction is through ORABM mode The lower ORABM_SERVERSIDE_STRESS stored procedure runs. For each concurrent session, ORABM_SERVERSIDE_STRESS runs in the ORABM command line specified by the number of transactions and returns the TPS value when the session is completed. To make sure all concurrent sessions are sampling intervals During the period, the TPS value includes only 80% of the middle of the transaction, namely: the initial 10% and the last 10% will be ignored. More details can be referred to http://www.linxcel.co.uk/orabm/ Content. Installation Step 1 Installing the Oracle OCI library For Oracle 9i, if you do not install the component, you may have to re-run RunInstall, select "Oracle Call Interfaces" in the Oracle 9i Client Products tree. For Oracle 10g, Oracle 10 OCI libraries should be installed by default. 2 Install TCLCD /usR/local/src/tcl8.4.5/unixRM -F Config.cache

./configure --enable-threads --enable-shared

Make clean

Make

Make Install

3 installation TK

CD /usr/local/src/tk8.4.5/unix

RM-F Config.cache

./configure --with-tcl = .. / .. / TCL8.4.5 / Unix --enable-threads --enable-shared

Make clean

Make

Make Install

4 Install TCL Threads

CD /usR/local/src/thread2.5.2/unix

RM-F Config.cache

Sh ../configure --enable-threads --enable-shared

Make cleanmake

Make Install

5 Install OratCl

For 10g, you want to edit the configuration file, near the 1728 line, follow the following sections: echo "Checking for Oracle 10.0 style topLEVel (libclient10.a)" 1> & 6echo "configure: 1730: checking For Oracle 10.0 Style TopleVel (LibClient10.a)> & 5for F in $ ORACLE_DIRECTORY $ ORATEST1 $ ORATEST2 $ ORATEST3 $ ORACLE4 / OPT / ORACLE / U / ORACLE / USR / ORACLE / USR / LOCAL / ORACLE; Do Echo "$ AC_T" "Looking for lib / libclient10.a in $ f" 1> & 6 if test -r "$ f / lib / libclient10.a"; the ORA = "$ f / lib" Oracle_home = $ f echo "$ ac_t" "setting ORA to $ ORA "1> & 6 TestVer = 10 ORA_MAJOR_VERSION = 10 ORA_MINOR_VERSION = 0 FOUND_ORACLE = 1 Break FidoneExport Oracle_Home = Your_oracle_Home_Directory

CD / USR / LOCAL / SRC / ORATCL-4-1-Branch / Unix RM-F Config.cache

Sh ../configure --with-tcl = .. / .. / TCL8.4.5 / Unix --with-Oracle-Directory = $ Oracle_Home --with-Oracle-Version = 9 (or 10 or 8!) - Enable-threads --enable-shared Note: The red part is adjusted for different database versions.

Vi Makefile - Change all - RPATH - WL, -RPATH,

Make clean

Make

Make Install

sqlplus orabm / orabm @ delivery_sp.sql sqlplus orabm / orabm @ new_order_sp.sql. sqlplus orabm / orabm @ ostat_sp.sql sqlplus orabm / orabm @ payment_sp.sql sqlplus orabm / orabm @ slev_sp.sql

Step Operation Command 1 Create an ORABM user (use Tools to do default table space, TEMP table space for temporary table space) SQLPlus system / pwd @orabm_user 2 Create Table SQLUS System / PWD @orabm_tab 3 Load Data $ ORABMLOAD WAREHOUSES 1 4 Create an index SQLPlus system / pwd @orabm_ind 5 analysis table and index sqlplus system / pwd @orabm_analyze 6 to create stress test PL / SQL procedure sqlplus system / pwd @orabm_serverside_stress 7 the table and index data buffer to SGA sqlplus system / pwd @orabm_cache the tpc-c.tcl The script loads in Hammerora (Remember to change the file filter from * .trc to * .tcl to see see tcl file), find the Connect string in this TPC-C.TCL, adjustment to your database user connection information. And adjust the virtual user information. Test Run Hammerora, create the number of users required, to simulate the TPC-C reference program (note that the environment variable for the Hammerora program is adjusted, it is best to use Oracle users). The following picture is the data obtained on the notebook. [ Machine performance checks a little :)]: Figure 2: Hammerora test results example reference information http://hammerora.sourceForge.NET/ Hammerora's home page. The current software version is 1.15.http: //www.linxcel.co. UK / ORABM / Geoff Ingram Maintenance Personal Site. There is also a very interesting tool ORASTRESS. It is used to perform Oracle database pressure test.http: //www.tpc.org TPC official site.http: // www. Cnoug.org/viewthread.php?tid=63 Technology Master Rudolflu has been introduced to ORABM tools before. Http://www.dbanotes.net/oracle/install-oracle10g-rhel3.htm installing Oracle 10g on RHEL AS 3 Step-By-Step This article author Fenng, a US-raising company DBA, spare time mixed with various databases related to each database and is not tired. Currently payment of how to use the Oracle database effectively build enterprise applications. A little study on Oracle Tuning, Troubleshooting. Personal technology site: http://www.dbanotes.net/. You can contact him by email dbanotes@gmail.com. Original source http://www.dbanotes.net/oracle/USE_OPENSOURCETOOL_IMPLEMENT_YOOWN_TPC-C.HTM

Back home

All Articles (by Fenng) Are Licensed Under a Creative Commons License.i Would Welcome Any Feedback. Please send Questions, Comments or Corrections to dbanotes@gmail.com

转载请注明原文地址:https://www.9cbs.com/read-110358.html

New Post(0)