Professional Documents
Culture Documents
Tuning Domino For Solaris
Tuning Domino For Solaris
The widening gap between central processing unit (CPU) speed and main
memory speed has challenged high-performance computing for more than a
quarter century. CPU designers have used more and more complex strategies to reduce the speed penalty of memory transactions, and they have
employed more and more levels of larger and more sophisticated cache
memories. Yet in all but the most regular computations, fast CPUs still
seem to idle for too many cycles while they wait for memory to catch up.
Eric Sosman
Staff Engineer
Sun Microsystems, Inc.
In 2005, Sun Microsystems introduced the UltraSPARCT1 (codenamed Niagara) processor, which takes a completely different approach
to dealing with memory latencies. Rather than trying to avoid memory
stalls, a strategy that has not been wildly successful, the T1 accepts the fact
that memory delays are inevitable and tries to improve throughput by doing
useful work instead of simply waiting. The strategy has been a great success
for applications such as IBM Lotus Domino, which is both highly
parallel and memory-intensive. Dominos out-of-the-box performance is
excellent, but there are still opportunities to tune both Domino (6.5 and up)
and SunTM SolarisTM for even better throughput. In this article, I briefly
describe the UltraSPARCT1 and its 2007 successor, the UltraSPARCT2,
and offer some approaches for tuning Domino and Solaris to take advantage of the thread-rich environments that these processors provide.
61
Instruction execution
Single-threaded CPU:
Time saved
Time
Figure 1
62
2008 THE VIEW and Sun Microsystems Inc. All rights reserved.
Update Solaris
The first and most important task might also be the
most banal: Make sure youre using an up-to-date
version of Solaris. Niagaras massive parallelism
changes the equation not only for applications, but
also for the task scheduler that Solaris uses to decide
which software threads run on which hardware strands
and when. The Solaris10 edition that was current in
2005, when the UltraSPARCT1 was introduced,
simply treats the thirty-two hardware strands as 32
independent execution units. This edition is not
equipped to understand that each strand is not truly
independent, because each quartet of strands shares
the resources of a single core. Updating the scheduler
to account for the interactions among cores and
strands was one of the first improvements made to
Solaris after the T1 was released, and further improvements were made as Solaris developers gained experience with Niagara. All the improvements are available
as patches and are incorporated in all recent Solaris
versions, so you can easily update by installing from
recent media or by visiting http://sunsolve.sun.com/
and installing the current recommended patch cluster
(which is a good idea in any case). Dont limit your
parallelism by running a mint-condition vintage 2005
Solaris!
63
64
Note!
You should not run Domino at the maximum
priority of 60, because if a thread gets into an
infinite loop, it monopolizes the CPU and you
would have a hard time killing it with the nsd
command! Leave yourself some priority
headroom.
2008 THE VIEW and Sun Microsystems Inc. All rights reserved.
65
Database.Database.BufferPool.Maximum.
Megabytes shows the maximum size to which the
buffer pool is allowed to grow. This may differ
slightly from the NNN value you specified,
because Domino rounds the size of the pool to fit
its own internal data structures, but thats nothing
to worry about. If the reported value is very
different from your NNN value, Domino has probably rejected that value as impossible.
Database.Database.BufferPool.Peak.Megabytes
displays the biggest the buffer pool has ever
grown since Domino was started. If this is close to
the maximum allowed value, Domino is in fact
making use of the memory. If it is substantially
below the maximum, Domino has not found it
necessary to use so much; you have probably
given it more memory than it can use and should
consider reducing NNN.
Database.Database.BufferPool.
PerCentReadsInBuffer indicates the effectiveness of the buffer pool. Ideally, you want this
value to be 90% or higher. If it is consistently
below about 85%, it is likely that Domino is
memory-starved and needs a higher NNN value.
If you need to enlarge the buffer pool, do so gradually, in steps of 100MB or so. If you get as high as
1,200MB and the PerCentReadsInBuffer statistic is
still low, it is probably better to split the load across
additional partitions than to try to keep increasing the
pool size; a pool that gets too big can crowd out other
essential parts of Dominos memory.
66
hardware strands to cooperate, forcing them to interrupt whatever they are doing and synchronize to keep
the file system happy. Reduce the frequency of these
adjustments to free up more CPU time for other uses;
this is especially important on UltraSPARCT1 and T2
machines, which must synchronize the activities of 32
or 64 virtual CPUs.
To tune the percentage of physical memory
devoted to the file system, edit the /etc/system file,
and at the bottom add the following line:
set segmap_percent=NN
Save the file and reboot Solaris. The best value for
NN is difficult or impossible to predict, but I suggest
the value of 40% as it should be safe for all but the
very smallest systems and is a considerable improvement over the default, which is usually 12%. Too high
a value can cause trouble, so dont be tempted to blast
up to the exotic values that youll find in NotesBench
reports: Benchmark loads are highly artificial, you
should not necessarily accept them as representative
of the real world.
How can you tell if youve used too high a
value? When the system is under load, run the
command vmstat10 to display virtual memory statistics every ten seconds (or use some other interval, if
you prefer). Find the sr (scan rate) column in the
output and watch it for a while. All is well if the sr
value is zero most of the time. An occasional brief
spike is nothing to worry about, particularly just as a
server or server task is starting, but most of the
values should be zero. If they are higher than zero
for long periods, its a sign of trouble, even if the
actual values are rather small. Edit /etc/system again
to reduce the segmap_percent value a little, and
reboot Solaris at the next opportunity.
2008 THE VIEW and Sun Microsystems Inc. All rights reserved.
Note!
You can configure Domino to have up to ten
mailbox databases. However, the greatest
benefit to parallelism comes from the first few.
67
Conclusion
Updating Solaris
Resources
The Domino Administrator help files contain vital, quick references to INI parameters, settings in
various configuration documents, and much more.
The IBM Redbook Domino 7 for Sun Solaris 10 is a compendium of best practices for sizing, configuring, tuning, monitoring, and troubleshooting Domino on Solaris:
www.redbooks.ibm.com/abstracts/sg247162.html
For a collection of brief tuning opportunities (some are covered in more detail in this article) for
Domino on Solaris, refer to Domino on Solaris: Common Tuning Tips in the Technical Documentation
section of Sun Microsystems Web site:
www.sun.com/lotus/
68
2008 THE VIEW and Sun Microsystems Inc. All rights reserved.