Red_Hat_Directory_Server-9.0-Performance_Tuning_Guide-en-US.pdf

(483 KB) Pobierz
Red Hat D irectory Server 9.0 Performance Tuning Guide
1
Red Hat Directory Server 9.0
Performance Tuning Guide
for the server and database
2
Legal Notice
Legal Notice
Copyright © 2010 Red Hat, Inc..
T he text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at
http://creativecommons.org/licenses/by-sa/3.0/.
In accordance with CC-BY-SA, if you distribute this
document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section
4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo,
and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus T orvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other
countries.
All other trademarks are the property of their respective owners.
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
December 7, 2011
Table of Contents
1. Intro to Directory Server Performance T uning
1.1. Setting Goals for Directory Server Performance
1.2. Giving Feedback
2. T racking Server and Database Performance
2.1. Monitoring Server Activity
2.2. Monitoring Database Activity
2.3. Monitoring Database Link Activity
2.4. Viewing Log Files
2.5. Replacing Log Files with a Named Pipe
2.6. Improving Logging Performance
3. Optimizing System Performance
3.1. T uning and Sizing System Memory
3.2. Using dsktune for Preliminary T uning
3.3. T uning File Descriptors
3.4. Setting Shell Limits for the Directory Server User
3.5. T uning T CP Ports
Red Hat D irectory Server 9.0 Performance Tuning Guide
3
3.6. Changing Firewall Settings for the Directory Server Console
3.7. DNS Requirements
4. Improving Search Performance (and Balancing Read Performance)
4.1. Using Indexes
4.2. T uning Directory Server Resource Settings
4.3. Setting Index Scan Limits
4.4. T uning the Database Cache for Searches
4.5. T uning the Database Settings for Searches
4.6. Managing Special Entries
5. T uning T ransaction Logging
5.1. Changing the Location of the Database T ransaction Log
5.2. Changing the Database Checkpoint Interval
5.3. Disabling Durable T ransactions
5.4. Specifying T ransaction Batching
6. Managing the Database Cache Settings
6.1. T uning Entry Cache
6.2. T uning Database Cache
7. T uning Database Link Performance
7.1. Managing Connections to the Remote Server
7.2. Detecting Errors During Normal Processing
7.3. Managing T hreaded Operations
1. Intro to Directory Server Performance Tuning
T his article provides some procedures and options that administrators can use to optimize the
performance of their Red Hat Directory Server deployments. Performance tuning a Directory Server
instance is unique to each server because of differences for every server in its machine environment,
directory size and data type, load and network use, even the types of operations that users and clients
perform.
T he purpose of this article is to highlight the features that Red Hat Directory Server provides for tracking
and assessing server and database performance. T here are also some procedures given to help tune
server performance. For more in-depth planning information, however, check out the
Red Hat Directory
Server Deployment Guide,
and for exhaustive command-line and UI-based administrative instructions,
see the
Red Hat Directory Server Administrator's Guide.
T he performance tuning features here apply to Red Hat Directory Server 9.0.
1.1. Setting Goals for Directory Server Performance
Performance tuning
is simply a way to identify potential (or real) bottlenecks in the normal operating
environment of the server and then taking steps to mitigate those bottlenecks.
T he general plan for performance tuning is:
1. Assess the environment. Look at everything around the Directory Server: its usage, the load, the
network connection and reliability, most common operations, the physical machine its on, along
with any services competing for its resources.
2. Measure the current Directory Server performance and establish baselines.
3. Identify the server areas which can be improved.
4. Make any changes to the Directory Server settings and, potentially, to the host machine.
4
Legal Notice
5. Measure the Directory Server performance again to see how the changes affected the
performance.
Directory Server provides some sort of monitoring in three areas:
T he server process (counters and logs)
T he databases (counters)
Any database links (counters)
In the Directory Server, most performance measurements are going to be how well the Directory Server
retrieves and delivers information to clients. With that in mind, these are the server areas that can be
tuned for the best Directory Server performance (and these are the areas covered in this article):
Search operations
Indexing performance (which affects both search and write operations)
Database transactions
Database and entry cache settings
Database links
Other changes can be made to the host machine's settings or hardware which can also affect Directory
Server performance:
Available memory (based on directory size)
Other servers running on the same machine (which could compete for resources)
Distributing user databases across other Directory Server instances on other machines
Balancing server loads due to network performance
T his changes relate much more to planning an effective Directory Server deployment than changes that
can be made to an instance. Reviewing the
Deployment Guide
can provide more detail about how to plan
an optimal enterprise deployment.
1.2. Giving Feedback
If there is any error in this
Performance and Tuning Guide
or there is any way to improve the
documentation, please let us know. Bugs can be filed against the documentation for Red Hat Directory
Server through Bugzilla,
http://bugzilla.redhat.com/bugzilla.
Make the bug report as specific as possible,
so we can be more effective in correcting any issues:
1. Select the Red Hat Directory Server product.
2. Set the component to
Doc - perform ance-and-tuning.
3. Set the version number to 9.0.
4. For errors, give the page number (for the PDF) or URL (for the HT ML), and give a succinct
description of the problem, such as incorrect procedure or typo.
For enhancements, put in what information needs to be added and why.
5. Give a clear title for the bug. For example,
"Incorrect com m and exam ple for setup
script options"
is better than
"Bad exam ple".
We appreciate receiving any feedback — requests for new sections, corrections, improvements,
enhancements, even new ways of delivering the documentation or new styles of docs. You are welcome
to contact Red Hat Content Services directly at
docs@redhat.com.
2. Tracking Server and Database Performance
Red Hat D irectory Server 9.0 Performance Tuning Guide
5
Red Hat Directory Server has two methods of recording and tracking performance data: performance
counters and logs. Counters are used to determine how well the Directory Server performing, particularly
in database performance; logs are used to diagnose any problem areas with server and LDAP
operations and configuration.
Performance counters focus on the operations and information of the Directory Server for the server, all
configured databases, and database links (chaining databases).
T here are three types of logs: access (for client connections), errors (for errors, warnings, and details of
events), and audit (changes to Directory Server configuration). T he access and error logs run by default
(and the errors log is required for the server to run). Audit logging, because of the overhead, must be
enabled manually.
NOTE
T he access log is buffered. T his allows full access logging even with highly loaded servers, but
there is a time lag between when the event occurs in the server and when the event is written to
the log.
2.1. Monitoring Server Activity
T he Directory Server's current activities can be monitored from either the Directory Server Console or
the command line. It is also possible to monitor the activity of the caches for all of the database.
NOTE
Some of the counters for Directory Server database attributes monitored by server use 64-bit
integers, even on 32-bit systems (total connections, operations initiated, operations completed,
entries sent, and bytes sent). On high-volume systems, this keeps the counters from rolling too
quickly and skewing monitoring data.
2.1.1. Monitoring the Server from the Directory Server Console
1. In the Directory Server Console, select the
Status
tab.
2. In the navigation tree, select
Perform ance Counters.
T he
Status
tab in the right pane displays current information about server activity. If the server is
currently not running, this tab will not provide performance monitoring information.
T he
General Inform ation
table shows basic information about the server, which helps set a
baseline about the statistics that have been gathered.
Zgłoś jeśli naruszono regulamin