tuning performance guide - ibm.com · transaction logs in your specific environment and then divide...

16
IBM Endpoint Manager for Software Use Analysis Version 9.1 (includes update 9.0.1, 9.0.1.1 and 9.0.1.2) Tuning Performance Guide

Upload: trinhkhanh

Post on 03-May-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

IBM Endpoint Manager for Software Use AnalysisVersion 9.1 (includes update 9.0.1, 9.0.1.1 and 9.0.1.2)

Tuning Performance Guide

���

IBM Endpoint Manager for Software Use AnalysisVersion 9.1 (includes update 9.0.1, 9.0.1.1 and 9.0.1.2)

Tuning Performance Guide

���

Tuning Performance Guide

This edition applies to IBM Endpoint Manager for Software Use Analysis 9.0.1.2 (product number 5725-F57) and toall subsequent releases and modifications until otherwise indicated in new editions.

© Copyright IBM Corporation 2002, 2014.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Tuning performanceYou can use the information in this section to identify andresolve the primary system bottlenecks in yourenvironment. The tips and performance recommendationscan be used both in big data environments and in smallerenvironments that are running on low-performancehardware.

InfrastructureThe main factor that affects the performance of the Software Use Analysis server isthe performance of the underlying infrastructure on which the application serverand the DB2 database are running. You must ensure that the recommendedrequirements are met.

Important: The official hardware recommendations were prepared withassumption that the Software Use Analysis server is running on a dedicatedphysical server or servers. If virtual machines are used, the specified hardware(processor, RAM, or disk space) must be exclusively dedicated to those virtualmachines – not shared with any others.Even if you meet the recommended requirements, the application might workslowly because of issues with the underlying hardware. The issues might becaused by, for example, sharing resources with other machines within the virtualenvironment. You can run some diagnostic methods to ensure that the underlyinginfrastructure is in good shape.

Memory performanceRAM performance metrics such as seek time or memory bandwidth, are strictlydependent on the memory type, which is linked with the processor type.

Restriction: Do not run your server on a virtual machine for which memorycompression was enabled, for example in x86 virtualization that is provided byVMware. It is especially true in case of the computer on which the DB2® databaseis running.

Pay particular attention to the amount of memory that is available for SoftwareUse Analysis and the DB2 application. It is important to monitor the RAM usageon a daily basis because memory usage differs greatly depending on how theapplication is being used. The main factors besides the environment size include:v The number of concurrent web UI usersv The frequency of data imports

Memory monitoring is especially important on the database computer asinsufficient amount of RAM can significantly slow down background tasks, such asPVU data aggregation because of memory swapping. Swapping, also known aspaging, is the use of secondary disk storage to store and retrieve application datafor use in RAM. It is automatically performed by the operating system andtypically occurs when the available RAM is depleted. Swapping can have a

© Copyright IBM Corporation 2002, 2013 © IBM 2002, 2014 1

significant impact on DB2 performance and should be avoided. To avoidswapping, ensure that sufficient RAM is available on the computer so processes donot consume all the available RAM. Use the following Linux tools to monitor RAMusage and memory swapping:v top

v free

v vmstat

v or sar

If you notice that there is almost no free memory available to Software UseAnalysis and the DB2 processes are being swapped to disk, the best solution is toincrease the RAM memory size.

Storage performanceTo ensure good performance of Software Use Analysis, it is essential to have goodstorage performance on the database server computer. The storage performance ofthe Software Use Analysis server alone is not that important.

The recommended average disk speed for the database server computer isspecified in the following table.

Table 1. Recommended average disk speed for the database server computer in specificenvironments

Deployment Size Disk Speed

Small (up to 5000 endpoints) 100 MB/sec

Medium (5000 - 30000 endpoints) 250 MB/sec

Large (more than 30000 endpoints) 400 MB/sec

Running hard disk testsOn Linux, you can use the hdparm and dd commands or the Bonnie++ applicationto determine the hard disk write rate. You can also use the iostat command todetermine average disk usage.

Determining the write rate with the hdparm command:

In the Linux operating system, there is a built-in hdparm command that can be usedto determine the hard disk write rate.

Procedure

In the Linux console, enter hdparm -t path_to_the_test_file

hdparm -t /dev/sda1Timing buffered disk reads: 200 MB in 1.19 seconds = 167.47 MB/sec

Running the disk test with the DD application:About this task

The DD test measures the most basic single-threaded disk access: a large sequentialwrite, followed by a large sequential read. It is relevant for the databaseperformance testing effort because it gives you the maximum speed for sequentialscans for large tables.

2 IBM Endpoint Manager for Software Use Analysis: Tuning Performance Guide

Note: Check the RAM size on the testing computer to correctly run a DD test andavoid file system caching that can distort the test results.

Procedure

1. Create a file that is twice the size of the RAM capacity on the test computerand copy it to the target computer hard disk.In your tests use a 4 KB block size because the default page size of the DB2table space that Software Use Analysis is using is 4 KB. For example, if youhave 16 GB of RAM, run the following command so that a 32 GB file namedddfile is created in the current directory:time sh -c "dd if=/dev/zero of=ddfile bs=4k count=8000000 && sync".

Note: Some implementations of DD report the write rate, but the timecommand always returns the execution time that is larger than the DD time.The time and rate reported by DD represent the rate without any lag orsynchronization time. Divide the data size by the time reported by the timecommand to get the real synchronous file writing rate.Example:8000000+0 records in8000000+0 records out32768000000 bytes (32 GB) copied, 38.924 s, 842 MB/sreal 3m49.192suser 0m0.450ssys 0m38.282s

In this example, the rate for writes including caching is 842 MB/s, butincluding the synchronization time it is much poorer – only about 136.46 MB/s(32 GB / 3 minutes 49 seconds).

2. To flush out the file system cache so that you read directly from the disk later,write to the disk another large file: dd if=/dev/zero of=ddfile2 bs=4kcount=4000000

3. Read the first large file. Since the file system cache is filled with the second file,this test returns a valid read rate result:time dd if=ddfile of=/dev/null bs=4k8000000+0 records in8000000+0 records out32768000000 bytes (32 GB) copied, 186.456 seconds, 167.6 MB/sreal 3m6.496suser 0m1.652ssys 0m10.753s

4. Compare the results with those in the table Recommended average disk writeand read rates for the database server computer to determine whether yourstorage can handle the DB2 database for your environment. The system shouldeasily be able to deal with a database of up to 10000 clients.

Determining disk usage:

If response times are slow, check the average disk usage with the iostatcommand. Disk usage times of greater than 80% can reduce I/O performance, it isdesirable to have average disk usage below 40%.

Procedure

In the Linux console, enter iostat -x interval durationWhere:

Tuning performance 3

v interval Is the time interval in seconds. If no interval is specified, the outputreflects the values over the entire period since the system was rebooted

v duration Is the number of times to run the command

Example:iostat -x 30 5

Tuning performance in big data environmentsYou can learn the possible causes of the most common performance issues in bigdata environments and known solutions to these issues, together with severalgeneral tips that help you to keep the system in good shape and avoidperformance problems.

Database maintenance

See the topic Maintaining the database to learn more how to manually maintainthe database tables. It is also possible to maintain the tables automatically by usingthe built-in DB2 mechanisms.

Scalability of multiple concurrent UI users

Concurrent users can work on the Software Use Analysis web UI, but their numberis limited for performance reasons. The application should be able to handleperformance load from two concurrent web UI users when it is running on thehardware that meets the minimal hardware requirements. To be able to handlemore than two concurrent web UI users, the underlying hardware must meet therecommended hardware requirements.

Configuring the transaction logs sizeIf your environment consists of many endpoints, increase the transaction logs sizeto improve performance.

About this task

The transaction logs size can be configured through the LOGFILSIZ DB2 parameterthat defines the size of a single log file. To calculate the value that can be used forthis parameter, you must first calculate the total disk space that is required fortransaction logs in your specific environment and then divide it, thus obtaining thesize of one transaction log. The required amount of disk space depends on thenumber of endpoints in your environment and the number of endpoints for whichnew scan results are available and processed during the data import.

Important: Use the provided formula to calculate the size of transaction logs thatare generated during the import of data. More space might be required fortransaction logs that are generated when you remove the data source.

Procedure1. Use the following formula to calculate the disk space for your transaction logs:

<The number of endpoints> x 1 MB + <the number of endpointsfor which new scan results are imported> x 1 MB + 1 GB

2. Divide the result by 0.00054 to obtain the size of a single transaction log file.3. Run the following command to update the transaction log size in your

database. Substitute value with the size of a single transaction log.UPDATE DATABASE CONFIGURATION FOR SUADB USING LOGFILSIZ value

4 IBM Endpoint Manager for Software Use Analysis: Tuning Performance Guide

4. For the changes to take effect, restart the database. Run the followingcommands:DEACTIVATE DB SUADBDB2STARTDB2STOPACTIVATE DB SUADB

5. Restart the Software Use Analysis server.a. To stop the server, run the following command:

/etc/init.d/SUAserver start

b. To start the server, run the following command:/etc/init.d/SUAserver stop

Examplev Calculating the single transaction log size for 100 000 endpoints and 15 000 scan

results:100 000 x 1 MB + 15 000 x 1 MB + 1 GB = 114 GB114 / 0.00054 = 211111

Increasing Java heap sizeThe default settings for the Java heap size might not be sufficient for medium andlarge environments. If your environment consists of more than 5000 endpoints,increase the memory available to Java client processes by increasing the Java heapsize.

Procedure1. Go to the <INSTALL_DIR>/wlp/usr/servers/server1/ directory and edit the

jvm.options file.2. Set the maximum Java heap size (Xmx) to one of the following values,

depending on the size of your environment:v For medium environments (5000 - 50 000 endpoints), set the heap size to

6144m.v For large environments (over 50 000 endpoints), set the heap size to 8192m.

3. Restart the Software Use Analysis server.

Maintaining the databaseTo ensure that the DB2 database works properly, you need to regularly back upyour data and perform maintenance actions.

About this task

The configuration of DB2 has a significant impact on performance. You shouldperform some standard actions to administer the database correctly. If you haveDB2 administration professionals, they can monitor the DB2 health andperformance. In other cases, you should follow the procedures that are describedin this topic to keep your database healthy.

Procedure1. Perform regular backups of the data that is stored in the database. It is

advisable to back up the database before updating the software catalog orupgrading the server to facilitate recovery in case of failure.a. Stop the server.

Tuning performance 5

b. In the DB2 command-line interface, run the following command: db2 backupdatabase SUADB.

c. Start the serverThe backup is created in the current working directory, and the file namecontains the instance name and time stamp of the backup procedure (forexample: TLMA.0.db2inst1.NODE0000.CATN0000.20101105000715.001).For more information about database backup strategies, see DB2 topic:Developing a backup and recovery strategy.

2. Reorganize the table to match the index and to reclaim space:a. Stop the Software Use Analysis server.b. In the DB2 command-line interface, run the following commands:

v db2 connect to SUADB

v db2 -x "select ’reorgtable’,substr(rtrim(tabschema)||’.’||rtrim(tabname),1,50),’ allowno access;’from syscat.tables where type = ’T’ and tabschema in(’ADM’,SAM,’DBO’) order by tabschema,tabname " > reorgs.sql

v db2 -tvf reorgs.sql

v db2 terminate

c. Start the Software Use Analysis server.3. Keep the statistics up-to-date. By default, DB2 statistics are run automatically. If

this option is disabled, you must manually run the following commands:a. Stop the Software Use Analysis server.b. In the DB2 command-line interface, run the following commands:

v db2 connect to SUADB

v db2 -x "select ’runstats ontable’,substr(rtrim(tabschema)||’.’||rtrim(tabname),1,50),’ andindexes all;’from syscat.tables where type = ’T’ and tabschema in(’DBO’,’SAM’,’ADM’) order by tabschema,tabname " > runstats.sql

v db2 -tvf runstats.sql

v db2 terminate

c. Start the server.

What to do next

For a more advanced investigation of queries that are used by the Software UseAnalysis server, you should use the DB2 design advisor command (db2advis). Ithelps in finding new indexes that can improve the database performance. TheDesign Advisor uses the output from the DB2 monitors to suggest the creation ofnew indexes. The suggestions are based on the queries that are found in monitors.For more information about Design Advisor, consult the DB2 documentation:v DB2 10.1

– db2advis - DB2 Design Advisor command– DB2 topic: Design Advisor

v DB2 10.5– db2advis - DB2 Design Advisor command– DB2 topic: Design Advisor

6 IBM Endpoint Manager for Software Use Analysis: Tuning Performance Guide

Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not grant youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785 U.S.A.

For license inquiries regarding double-byte character set (DBCS) information,contact the IBM Intellectual Property Department in your country or sendinquiries, in writing, to:

Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan, Ltd.19-21, Nihonbashi-Hakozakicho, Chuo-kuTokyo 103-8510, Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESSFOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express orimplied warranties in certain transactions, therefore, this statement may not applyto you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct and use of those Web sites is at your own risk.

© Copyright IBM Corp. 2002, 2014 7

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM Corporation2Z4A/10111400 Burnet RoadAustin, TX 79758 U.S.A

Such information may be available, subject to appropriate terms and conditions,including in some cases, payment of a fee.

The licensed program described in this information and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement, or any equivalent agreementbetween us.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

TrademarksIBM®, the IBM logo, and ibm.com® are trademarks or registered trademarks ofInternational Business Machines Corp., registered in many jurisdictions worldwide.Other product and service names might be trademarks of IBM or other companies.A current list of IBM trademarks is available on the Web at “Copyright andtrademark information” at www.ibm.com/legal/copytrade.shtml.

Java™ and all Java-based trademarks and logos are trademarks or registeredtrademarks of Oracle and/or its affiliates.

Linux is a registered trademark of Linus Torvalds in the United States, othercountries, or both.

8 IBM Endpoint Manager for Software Use Analysis: Tuning Performance Guide

Privacy policy considerations

IBM Software products, including software as a service solutions, (“SoftwareOfferings”) may use cookies or other technologies to collect product usageinformation, to help improve the end user experience, to tailor interactions withthe end user or for other purposes. In many cases no personally identifiableinformation is collected by the Software Offerings. Some of our Software Offeringscan help enable you to collect personally identifiable information. If this SoftwareOffering uses cookies to collect personally identifiable information, specificinformation about this offering’s use of cookies is set forth below.

This Software Offering does not use cookies or other technologies to collectpersonally identifiable information.

If the configurations deployed for this Software Offering provide you as customerthe ability to collect personally identifiable information from end users via cookiesand other technologies, you should seek your own legal advice about any lawsapplicable to such data collection, including any requirements for notice andconsent.

For more information about the use of various technologies, including cookies, forthese purposes, See IBM’s Privacy Policy at http://www.ibm.com/privacy andIBM’s Online Privacy Statement at http://www.ibm.com/privacy/details thesection entitled “Cookies, Web Beacons and Other Technologies” and the “IBMSoftware Products and Software-as-a-Service Privacy Statement” athttp://www.ibm.com/software/info/product-privacy.

© Copyright IBM Corp. 2002, 2014 9

10 IBM Endpoint Manager for Software Use Analysis: Tuning Performance Guide

����

Printed in USA