Mailstone Utility -- Netscape Messaging Server 4.0
Mailstone Utility
This document describes how to use the Mailstone utility (version 1.1)
for capacity planning and testing on Netscape Messaging Server 4.0 and
Messaging Server 3.x. You can use Mailstone
on all Unix platforms supported by Netscape Messaging Server and on Windows
NT also. Instructions for using Mailstone on both Unix and Windows NT are
included here.
This document contains the following sections:
About the Mailstone Utility
What Mailstone Is
The Mailstone utility is a stress-testing tool with which system administrators
can determine Netscape Messaging Server capacity by testing how the server
performs under heavy loads. Mailstone simulates tasks that users might
perform. It lets you simulate worst-case loads--for example, Monday at
9 a.m., when most users are checking their mail and sending and receiving
messages--so that you can determine what maximum load your messaging server
can take. Mailstone can also help in tuning your system's overall performance
by providing a constant load on the server. This can help you identify
problem areas so that you can adjust server parameters as needed.
You should use the Mailstone utility when you first set up your messaging
system. Based on how well your mail server handles the loads generated
by Mailstone, you can determine whether your current deployment configuration
is adequate, or whether you need more powerful or additional server machines.
How Mailstone Works
Mailstone consists primarily of a program that runs
on a set of client machines. Those machines, along with the server to be
tested, constitute the Mailstone testbed. You set up for the test by creating
an arbitrary number of users in an LDAP user diretory that will randomly
send and retrieve messages. You configure the specifics of the test by
creating a configuration file and a commands file. You pick one client
machine to be the mailmaster client; you will run the test from
that machine. (See Figure 1.)
Figure 1. Mailstone testbed
On the mailmaster client machine, Mailstone
execution starts with the mailmaster Perl script, which
-
reads the mailmaster configuration file
to determine the location of the mailclient commands
file and the length of time to run the test
-
parses the mailclient commands
file to determine the testbed configuration and to build the command-line
arguments for invoking the mailclient program
-
uses rsh to start the execution of mailclient
processes across the testbed
-
collects all results and displays them in an HTML
page
Because the mailmaster script does not run
on Windows NT, the mailmaster client must be a Unix
machine. Other client machines can be either Unix
or Windows NT. It is also possible to run a Mailstone test that uses only
a single client machine (which may be either Unix
or Windows NT), without using mailmaster.
The main utility program for Mailstone is mailclient.
It accepts several command-line arguments (described below), including
the location of command information and test-configuration information.
mailclient executes on each client machine and sends its results
back to mailmaster for collection and summary.
Mailstone measures both throughput and response time of the mail server
being tested. Mailstone reports the number and size of messages sent, the
rate at which messages (and bytes) pass through the system, and the average
time taken to both transmit a message to the server and receive a message
from the server. Mailstone can present its results in both text and graphical
format (see Figure 2 and Figure
3).
The Mailstone Files
The Mailstone utility includes the files shown in Table
1.
Table
1. Mailstone files
File |
-
Description
|
-
mailclient (Unix)
mailclient.exe (NT) |
The principal Mailstone program--the one that talks to the
mail server. |
-
mailmaster (Unix)
|
-
The Perl script used to start all the mailclient instances and
collect results.
|
-
doc/bench
-
doc/bench2k
doc/bench3k
doc/bench10k |
-
The "filler" message bodies that Mailstone uses when it sends messages
during testing. See Sample
Messages in Standard Sizes.
|
-
admin/create_accounts_ldif
admin/create_broadcast_ldif |
-
Script tools used to create test mail accounts. See The
User-Account LDIF Scripts.
|
loadclient (Unix) |
A shell script that facilitates directly running the mailclient
program. See Running Mailstone on Unix Platforms. |
-
conf/commands
|
-
An example mailclient commands file. The commands file tells clients
which protocols to use and how. (A mailclient commands file must
be on each client machine.) See The
mailclient Commands File.
|
-
conf/CONFIG
|
-
An example mailmaster configuration
file. This file is read by the mailmaster program, and contains
generation information about the test (for example, the amount of time
the test should run for ). See The
mailmaster Configuration File.
|
Running Mailstone on Unix platforms
On Unix platforms, you can use multiple low-end client machines to put
stress on a single high-end server machine. The Mailstone utility on Unix
platforms makes use of the following Unix-specific capabilities (it is
assumed that you are familiar with them):
-
rsh, the remote shell program (for remotely executing mailclient
on client machines)
-
.rhosts, the remote hosts file (for configuring the client machines
to accept rsh from the mailmaster client)
-
Perl, the Practical Extraction and Report Language (for running mailmaster;
the mailmaster client machine must have Perl version 5.0 or later)
You may also want to use rcp, the remote copy program, to copy
the mailclient commands file from the master client machine to
the other clients.
Running Mailstone
from a Unix mailmaster Client
Follow these steps to run Mailstone from a Unix machine as the mailmaster
client (other client machines may be either Unix or Windows NT):
-
Pick one Unix machine to be the master from which you will run the mailmaster
program. Install Mailstone onto this machine by creating a directory /mailstone
and unpacking the archive file (mailstone.zip)
into it. The unpacking places the proper files in each subdirectory,
as shown in Table 1.
-
Create user accounts on your mail server:
-
Create ldif files that define users test0, test1,
and so on by editing and running the scripts create_accounts_ldif
and create_broadcast_ldif. See The
User Account LDIF Scripts for details.
-
Load the ldif file created by the scripts into your directory.
(As noted in The User Account
LDIF Scripts, be careful not to overwrite your existing directory entries.)
-
Send a broadcast message to spam@yourServer.com.
This message instructs the mail server to create a mailbox for each user.
(Sending the broadcast message is not absolutely necessary since the first
piece of mail sent to any user will create the user's mailbox. However,
using the broadcast message to create all the mailboxes at the beginning
of the test produces better results.)
Note that the mail server must be running when you send the broadcast
message. Note also that, if you have a large number of test users, it may
take a significant amount of time for the broadcast message to be sent
to everyone and for all the mailboxes to be created.
-
Specify your client configuration and test parameters:
-
On the mailmaster client machine, edit the mailclient
commands file to specify the client machines that you will use for the
test and to define other test parameters. See The
mailclient Commands File for details.
-
On the mailmaster client machine, edit the mailmaster
configuration file so that it defines the appropriate input to mailmaster.
See The mailmaster Configuration
File for details.
-
Create a /mailstone directory on every client. (See Using
Windows NT as a Client Machine for special information about Windows
NT clients.) You can install the entire set of Mailstone files into this
directory, just as on the mailmaster client. As a minimum, the
directory should contain
-
the mailclient program (select the appropriate one for the client's
specific operating system)
-
any message bodies (such as bench2k, bench3k, and so
on) to be used during the test (place them in the /doc subfolder)
-
the mailclient commands file
-
Verify that the user running mailmaster has rsh privilege
on every client machine in the testbed.
-
Run the mailmaster program using this command:
./mailmaster -c ./conf/CONFIG
(Replace CONFIG with the name of your mailmaster
configuration file, if you have changed the name. Replace the pathname
with the correct path, if you have moved the file.)
-
If necessary, edit the mailmaster configuration
file and rerun the test. Try short test times of 1 minute until everything
works properly and the configuration reflects what you want to test.
Try seeding the mailboxes by sending only SMTP for the first few minutes
of runtime, so there will be some initial messages for POP or IMAP retrieval.
(You can do this by editing the mailclient commands file on every
client and commenting out the POP3 and IMAP4 commands.)
Running mailclient Directly
For testing and debugging, or if your test uses only
a single Unix client machine, you can run
the mailclient program directly on the client. Use the command
line
mailclient [-d] -s|-u filename -t
timeInMins -n numClients
where the options have the following meanings:
-d : Turn on verbose debugging.; each
client process writes to a /tmp/debug.$$
-s : Use stdin to provide commands
information (mailmaster uses this by default to rcp the
single central copy of the mailclient commands
file to all Unix clients)
-u : Use the local mailclient
commands file specified in filename;
for example /mailstone/commands
-t : Run the test for the number of minutes
specified in timeInMins
-n : Spawn the number of child processes
specified in numClients
Instead of running mailclient directly, you can execute the loadclient
script, a very simple script that fills in the mailclient
command line and executes it for you. (You can load it into the /mailclient
directory when you load in the other files.) By default, loadclient
runs mailclient as a single process for two minutes. You can edit
loadclient to run any specific configuration of mailclient
repeatedly without having to retype the command line each time.
NOTE: When you run mailclient by itself, its raw results
are sent to standard output rather than being sent to mailmaster
for further processing.
Running Mailstone on Windows NT
Mailstone works with Windows NT machines as clients of a Unix mailmaster
client and also as single stand-alone client machines (with no mailmaster
client).
Using Windows NT as
a Client Machine
You can use Windows NT machines as clients in a multiple-client Mailstone
test, as described above (see Running
Mailstone from a Unix mailmaster Client). However, note these
restrictions and requirements:
-
The mailmaster client (the machine that runs the mailmaster
script) cannot be Windows NT.
-
Each Windows NT client must be configured to accept rsh commands
from the mailmaster client.
-
You must manually load the mailclient commands file onto each
Windows NT client.
To allow Windows NT to work with rsh, you can obtain the public-domain
remote shell daemon program (rshd.exe).
It is recommended that you use version 1.6 or later, which runs as an NT
service. The program and its documentation are available to download from
http://home.us.net/~silviu/rshd/rshd16.zip.
To use a Windows NT machine as a client that works with a Unix master,
follow these steps:
-
Create a C:\MAILSTONE directory on your NT system. Into this directory,
place
-
the rshd.exe file
-
the mailclient commands file
-
the mailclient.exe program
-
any message bodies (such as bench2k, bench3k, and so
on) to be used during the test (place them in the /doc subfolder)
-
Run the rshd.exe program with the -r option (to disable
access control), or as an NT service, on the client machine. You must do
this before starting the test, or the mailmaster script will not
be able to communicate with this client.
CAUTION: The remote shell daemon for Windows NT is not secure; while
it is running on an NT client, any rsh program on the network
can control that client. Be careful of the circumstances under which you
run your NT clients with this service.
Using Windows NT as a Single Stand-alone Client Machine
You can use a Windows NT machine as the "master client"
in a single-client test. In this case, the mailmaster script,
which is not supported on NT, is not needed because there are no other
client machines to coordinate with. You instead run mailclient.exe
directly on the single client machine.
Follow these steps to run Mailstone on a single-client Windows NT configuration:
-
Install Mailstone on the machine, into the following directory structure.
Create a C:\mailstone directory. The directory should contain
at least these files:
-
the mailclient.exe program
-
the mailclient commands file (start with a copy of the sample
file commands that comes with Mailstone)
-
the test message bodies (bench2k, bench3k, and so on)
that Mailstone will use
-
the scripts create_accounts_ldif and create_broadcast_ldif
-
Create user accounts and passwords on your mail server:
-
Create ldif files that define users test0, test1,
and so on. If you have a version of Perl that runs on Windows NT, you can
do this by configuring the scripts create_accounts_ldif and create_broadcast_ldif.
See The User Account LDIF Scripts
for details.
-
Load the ldif file you have created into your directory. (As noted
in The User Account LDIF Scripts,
be careful not to overwrite your existing directory entries.)
-
Send a broadcast message to spam@yourServer.com.
This message instructs the mail server to create a mailbox for each user.
(Sending the broadcast message is not absolutely necessary since the first
piece of mail sent to any user will create the user's mailbox. However,
using the broadcast message to create all the mailboxes at the beginning
of the test produces better results.)
Note that the mail server must be running when you send the broadcast
message. Also, if you have a large number of test users, it may take a
significant amount of time for the broadcast message to be sent to everyone
and for all the mailboxes to be created.
-
Specify your test parameters. Modify the mailclient commands file
to define the commands, number of threads, time, and other test parameters.
See The mailclient Commands
File for details.
-
Run the mailclient program as shown here:
mailclient [-d] -u filename -t timeInMins
-n numClients
where the options have the following meanings:
-d : Turn on verbose debugging; each
client thread writes to .\debug.$$
-u : Use the local mailclient
commands file specified in filename;
for example C:\mailstone\commands
-t : Run the test for the number of minutes
specified in timeInMins
-n : Spawn the number of NT threads
specified in numClients
Try seeding the mailboxes by sending only SMTP for the first few minutes
of runtime, so there will be some initial messages for POP or IMAP retrieval.
(You can do this by editing the command list on the client and commenting
out the POP3 and IMAP4 commands.)
NOTE: When you run mailclient by itself, its raw results
are sent to standard output rather than to mailmaster for further
processing.
Setting Up a
Mailstone Test
Setting up to run a Mailstone test involves editing various configuration
and script files to define the set of machines that make up the testbed,
the size of user base you are testing with, and the messaging characteristics
you want the test to reflect. This section gives the details of how to
edit those files.
How Many Client Machines to Use?
You will typically want more than one client machine for a test, in order
to sufficiently stress the mail server being tested. Basically, you
want to have enough client machines so that you can reach or exceed the
capacity of the server. An initial rule of thumb may be to
use at least as many client machines as there are processors in your mail
server machine.
The
mailmaster Configuration File
The mailmaster configuration file (named
CONFIG in the sample files distributed
with Mailstone) defines the input to the mailmaster script. Here is an
example file:
# Turn on debugging.
DEBUG=1
# Test time, in minutes
TIME=12
# path to gnuplot
GNUPLOT=./admin/bin/gnuplot
# path to ppmtogif
PPMTOGIF=./admin/bin/ppmtogif
The DEBUG Directive
Setting DEBUG to 1 turns on debugging; doing
so creates the file /tmp/debug.$$ on every Unix
client for every process. On Windows NT, the mailclient
program creates a file C:\mailstone\debug.$$ for each thread when
debugging is on. (Comment out this directive to turn off debugging.)
CAUTION: debugging files can grow very
large; if necessary, shorten the test time (TIME) accordingly.
The THROTTLE Directive
The THROTTLE directive controls the rate
at which clients connect to the server. Normally, Mailstone clients connect
as fast as possible in order to put maximum stress on the server. If, however,
your projected client connection speeds are anticipated to be slower (for
example, if most connections are expected to be through modem dialups),
you can set a throttle to more accurately simulate your installation's
probable loads. Throttle values are the maximum number of operations per
minute per client process. By default, there is no throttle; the
directive is commented out.
The GNUPLOT Directive
The GNUPLOT directive specifies the location
of the gnuplot program on the mailmaster client machine.
Mailstone can create graphs of your test results by using the public-domain
gnuplot program, available at
If you install the gnuplot program on your mailmaster
client machine and specify its location with this directive, Mailstone
automatically uses gnuplot to create a graphical file of its results.
The PPMTOGIF Directive
The PPMTOGIF directive specifies the location
of the ppmtogif program on the mailmaster client machine.
This program takes the output of the gnuplot program and converts
it to a GIF file. If you specify both gnuplot and ppmtogif
with these directives, Mailstone automatically uses them to display its
results graphically in HTML (see Figure
3).
The
mailclient Commands File
Mailstone clients (instances of the mailclient
program) select commands at random from a single commands file. The file
is by default maintained centrally on the machine running mailmaster
(NT clients must have a local copy). While it is permissible to customize
the mailclient commands file differently
on each client machine, in almost all cases all your clients should have
identical copies of the file, to avoid confusion and errors.
The format of the mailclient commands
file is similar to that of the the obj.conf file on Netscape servers.
It includes InitHost directives, read by mailmaster,
which describe the testbed. It also includes the command tags (<SMTP>,
<POP3>, <IMAP4>, and <Default>), which
describe each command to be executed and which machines it should run on.
The command tags occur in pairs, some tags have attributes embedded within
them, and the opening and closing tags of a pair surround command-specific
directives.
An
Example mailclient Commands File
InitHost
host=cayman clients=50 type=unix
InitHost host=stcroix clients=200 type=NT
<Default>
server mingus.mcom.com
smtpMailFrom mailstone
accountFormat test%d@mingus.mcom.com
passwdFormat password
throttle 5
numAccounts 5000
</Default>
<SMTP HOSTS=cayman>
file /mailstone/bench
weight 4
</SMTP>
<SMTP HOSTS=cayman,machineA>
file /mailstone/bench3
numrecips 3
weight 20
</SMTP>
<POP3 HOSTS=cayman,machineB>
weight 10
</POP3>
<IMAP4 HOSTS=stcroix>
weight 5
</IMAP4>
InitHost Directive
The InitHost directive in the mailclient
commands file completely describes the testbed and
is processed only by mailmaster. Each directive may include
the following attributes (the first three are required):
host |
(required) Host name of client machine (must be identical to name returned
by hostname command) |
clients |
(required) Number of simultaneous Unix processes (or NT threads) to
execute on that host |
type |
(required) Operating system (unix or nt) |
ramp |
(optional) Number of seconds between forking of processes (threads)
on that host |
The mailmaster script executes an instance
of mailclient on each host, first building the command-line arguments
to mailclient to set the number of clients to fork, and optionally
using ramp to stagger the forking of the clients. Here is an example
InitHost directive that uses all four attributes:
InitHost host=mingus clients=5 type=unix ramp=60
The example
commands file shown earlier in this section specifies that 50 mail clients
are to be forked on the Unix machine cayman
and 200 threads are to be started on the NT machine stcroix.
No ramp is specified.
The rest of the mailclient commands
file is parsed by the mail clients on each host. The mailclient
program looks for command tags that apply to the given host it is running
on. For example, one machine might be used solely for IMAP commands
while another is used solely for SMTP sends.
The mail client determines the set of commands
that apply to its host and then begins selecting commands to execute at
random. The client generates a random number to determine which user account
to either send mail to or retrieve the mailbox contents of; the client
also generates a weighted random number to determine which command to execute.
Each command has a weight factor that determines its relative frequency
of occurrence. For example, if the weights of all commands for a
host sum to 100, and a particular command has a weight of 18, then that
command has an 18% chance of being chosen every time a command is executed.
By adjusting the weight factors for the commands, you can balance the sends
and retrieves appropriately for your clients.
Descriptions of the Command Tags
These are the descriptions of the attributes and
directives associated with the command tags in the mailclient
commands file. (Atributes appear within
the angle brackets of a tag; directives appear as individual lines between
the opening and closing tags of a pair.)
-
<Default>...</Default>
-
A convenience tag to set values default for directives
for the rest of the command tags. For example, each tag may use the
same mail server or the number of test accounts may be the same. Directives
defined here needn't be defined in the other tags.
These are some directives that make useful defaults:
-
Directive |
Description |
Example |
server |
The mail server |
mail.foo.com |
smtpMailFrom |
Email address of sender (all messages come from
one sender) |
mailstone |
accountFormat |
Mail address convention for test users |
test%d@mingus.mcom.com
(for user accounts test0, test1, etc.) |
passwdFormat |
Password convention for test users |
password
or password%d
(for user accounts test0, test1, etc.) |
numAccounts |
Number of test user accounts |
5000 |
beginAccounts |
An optional number at which to begin numbering
user accounts (if you don't want to start at 0) |
100 |
throttle |
Seconds-per-operation throttle, to artificially
limit the rate at which clients access the server |
10 |
Note: Redefining a directive in one of
the other command tags overrides--for that command alone--the default defined
here.
-
<SMTP HOSTS=machA,machB,machC,...>...</SMTP>
-
Tells a mail client running on a host listed in the
HOSTS attribute to send a message by SMTP. (Note that host names
listed in the HOSTS attribute here must exactly match one or more
of the host names specified in the InitHost directives at the
beginning of the mailclient commands
file.)
Mailstone performs these tasks when it executes
an SMTP message send:
-
It connects to the mail server, noting the time required
to achieve connection.
-
It sends a greeting message to the server.
-
It constructs a message with MAIL FROM and
RCPT TO fields, appends a message body, and sends it to the mail
server.
-
It quits the connection, noting the time required
to send the message and the total time since attempting the connection.
SMTP messages go to the user account specified
with the accountFormat directive (mailclient applies
a random number as shown to get the actual address). The sender is the
mailclient program itself (the message header lists the sender
as the string defined by the smtpMailFrom directive).
These are the directives specific to the <SMTP>
tag:
-
Directive |
Description |
Example |
server* |
The mail server |
mail.foo.com |
smtpMailFrom* |
Email address of sender |
mailstone |
accountFormat* |
Mail address convention for test users |
test%d@mingus.mcom.com
(for user accounts test0, test1, etc.) |
numAccounts* |
Number of test user accounts |
5000 |
weight* |
Command weighting
(compared to other commands for a given host) |
20 |
file* |
File to send as the message body |
/mailstone/bench2 |
numrecips |
Number of mail recipients per send (regardless
of the number of recipients, each message counts as one SMTP send) |
3 |
throttle |
Seconds-per-operation throttle |
10 |
*Required if not defined with
<Default> |
|
|
-
<POP3 HOSTS=machA,machB,machC,...>...</POP3>
-
Tells a mail client running on a host listed in the
HOSTS attribute to execute a POP download. (Note that host names
listed in the HOSTS attribute here must exactly match one or more
of the host names specified in the InitHost directives at the
beginning of the mailclient commands
file.)
Mailstone performs these tasks when it
executes a POP3 download:
-
It connects to the mail server, noting the time required
to achieve connection.
-
It submits a user's name password, and status to
the mail server.
-
It loops through all messages in the user's mailbox,
retrieving each one and then deleting it.
-
It quits the connection, noting the time required
to retrieve all messages and the total time since attempting the connection.
Messages are downloaded from the mailbox specified
with the accountFormat directive (mailclient applies
a random number as shown to get the actual address). The client connects
to the user account's mailbox and downloads all new messages.
These are the directives specific to the <POP3>
tag:
-
Directive |
Description |
Example |
server* |
The mail server |
mail.foo.com |
accountFormat* |
Mail address convention for test users |
test%d@mingus.mcom.com
(for user accounts test0, test1, etc.) |
passwdFormat* |
Password convention for test users |
password |
numAccounts* |
Number of test user accounts |
5000 |
weight* |
Command weighting
(compared to other commands for a given host) |
20 |
leaveMailOnServer |
Don't delete downloaded mail from server (Boolean) |
1 |
throttle |
Seconds-per-operation throttle |
10 |
*Required if not defined with
<Default> |
|
|
-
<IMAP4 HOSTS=machA,machB,machC,...>...</IMAP4>
-
Tells a mail client running on a host listed in the
HOSTS attribute to execute an IMAP session. (Note that host names
listed in the HOSTS attribute here must exactly match one or more
of the host names specified in the InitHost directives at the
beginning of the mailclient commands
file.)
Mailstone performs these tasks when it
executes an IMAP session:
-
It connects to the mail server, noting the time required
to achieve connection.
-
It logs in with a user's name and password.
-
It selects a mailbox and loops through all messages,
retrieving each one and then deleting it.
-
It closes the mailbox, noting the time required to
retrieve all messages.
-
It quits the connection, noting the total time since
attempting the connection.
The client connects to the mailbox of the user
account specified with the accountFormat directive (mailclient
applies a random number as shown to get the actual address) and downloads
all new messages.
These are the directives specific to the <IMAP4>
tag:
-
Directive |
Description |
Example |
server* |
The mail server |
mail.foo.com |
accountFormat* |
Mail address convention for test users |
test%d@mingus.mcom.com
(for user accounts test0, test1, etc.) |
passwdFormat* |
Password convention for test users |
password |
numAccounts* |
Number of test user accounts |
5000 |
weight* |
Command weighting
(compared to other commands for a given host) |
20 |
throttle |
Seconds-per-operation throttle |
10 |
checkMailInterval |
Interval (in seconds) between checks for new mail |
120 |
searchFolder |
Folder on server in which to search for user's mailbox
(currently, only INBOX is supported) |
INBOX |
searchPattern |
String pattern to use in searching for the message subject |
test |
searchRate |
Number of searches to perform per 8-hour day. Mailstone randomly
chooses a search schedule based on the search rate and spreads the searches
over the entire test run. With a search rate of 12, an 8-hour run
would execute all searches, whereas a 30-minute run may not execute any
at all. |
12 |
*Required if not defined with
<Default> |
|
|
The User-Account
LDIF Scripts
Mailstone includes the two Perl scripts create_accounts_ldif
and create_broadcast_ldif, which you can use to facilitate the
creation of the user accounts needed to run a test. You create the accounts
in your user directory (Mailstone requires that you have a functioning
LDAP directory server in place).
User accounts are of a form similar to usernameN,
where username is a common string, and N
varies from zero to one less than the number of users in the test.
Account names are defined by the accountFormat attribute in the
mailclient commands file. The examples
in this document use account names of test0, test1, and
so on (accountFormat = test%d).
Passwords for the accounts can be the same for
all users (the examples shown here all use the single password password),
or you can define a password format that, as in the account name, includes
a number. For example, the format could be pwd0, pwd1,
and so on (passwdFormat = pwd%d).
You need to modify the following lines in the
create_accounts_ldif and create_broadcast_ldif scripts
before using the scripts:
Default value |
Modification needed |
#!/usr/local/bin/perl |
Make sure this is the correct path to your Perl binary. (Note that
Mailmaster requires Perl 5.0.) |
$server = "mingus.mcom.com"; |
The fully qualified domain name (FQDN) of the mail server being tested,
as listed in your LDAP directory. |
$basedn = "o=netscape, c=US"; |
The base distinguished name (DN) for directory searches on your directory. |
$usernamebase = "test"; |
The base string from which to construct user account names for the
test. (You can use this default as is; if you change it here, you must
also change it in the accountFormat attribute in the mailclient
commands file.) |
$userpassword = "netscape"; |
The password for all user accounts. Make sure this is the same value
that you specify in the passwdFormat attribute in the commands
configuration file.
NOTE: If you use unique passwords with a replaceable-number
format, such as pwd%d, you'll need to bypass or modify this script
to accommodate that format. |
$num_accounts = 2000; |
The number of test accounts to create. This should be at least as large
as the maximum number of users you expect to use in subsequent tests. |
$mailboxSubDirs = $num_accounts/500; |
The maximum number of mailboxes per subdirectory on the mail server.
For most situations, the default is reasonable and you can keep it. If
you have particular reasons for changing it and understand the implications
of doing so, you can use a different value. |
You first run the create_accounts_ldif script
to create a test LDIF file that contains directory entries for all the
user accounts:
# ./create_accounts_ldif > accounts.ldif
You then run the create_broadcast_ldif script
(it creates the spam broadcast address that initially constructs
the user mailboxes) and append the results to your test LDIF file:
# ./create_broadcast_ldif >> accounts.ldif
You then add the test LDIF file's entries to your
directory.
IMPORTANT: Do not overwrite your existing
directory entries by importing the test LDIF file and creating a completely
new LDAP database. Either use the Directory Server's Add Entries user interface,
or export the current directory as LDIF, combine it with the test LDIF
file, and reimport the combined file. See the Directory Server Administrator's
Guide and online Help for more information.
Sample
Messages in Standard Sizes
The Mailstone distribution also includes three standard-sized
message bodies that you can use for sending and retrieval during the tests.
The files bench2k, bench3k, bench10k, and bench
consist of meaningless text data occupying 2K, 3K, 10K, and 250K bytes,
respectively. Mailstone constructs a message that it sends to a user mailbox
by adding header information to the body data.
You specify which of the body files to use when you define the file
attribute of the SMTP tag in the mailclient commands
file. (You can specify your own file in place of the provided files, if
you wish.)
Reviewing Results
Mailstone presents the results of its test in a summary
HTML page, such as the one shown in Figure
2.
Figure
2. Mailstone Results page
The top of the page lists various summary statistics
such as total number of connections and total messages, connections per
second and messages per second, and server throughput. A table shows results
broken down by protocol (SMTP, POP3, and IMAP4).
If you use the gnuplot and ppmtogif programs (see
The mailmaster Configuration
File), the results page also includes a graphical plot of the results,
as shown in Figure 3.
Figure 3. Plot
of Mailstone results
Consider these two points when reviewing the results
of a Mailstone performance analysis:
-
Did the test accurately simulate the type and volume
of mail traffic for your enterprise?
-
Did the server--both software and machine--handle
the load within an acceptable margin of performance?
The principal factors that can distort server statistics
are byte throughput and message throughput. After running Mailstone
a few times, you may notice that the server byte throughput is directly
proportional to the average SMTP message (file) size, and you may also
notice that message throughput (as well as byte throughput) is distorted
by larger than normal mailboxes. Therefore, be sure to configure
your Mailstone tests to reflect your actual or projected messaging characteristics.
For example, you might say "during our peak activity in the morning, we
handle up to 2,000 employees sending an average of 5 messages of 20K average
size and receiving 25 messages of same size." The more accurately your
input reflects the reality of your messaging system, the more relevant
will be the data generated by Mailstone.
Mailstone displays the results of a run in terms
of the statistics for each protocol: SMTP, POP3, and IMAP4. With
this information, you can determine (1) whether enough SMTP connections
were made to the server during the run and (2) how many messages were downloaded
over how many POP3/IMAP4 connections.
If the number of SMTP connections is not in the
acceptable range--that is, not close to the projected usage for your installation--consider
adding more client processes or machines or checking the server performance
during the run. You should also check the message/connection ratio
for POP3/IMAP4 for consistency with your projections, and make any necessary
adjustments adjustments to the mailboxes before running the next test.
Monitoring the server performance during test
runs is crucial in understanding the results. If you have a sufficient
number of clients for the test, and yet the desired number of client connections
is not being achieved and the server CPU usage and process run queue is
not settling down after the initial spike, you may need to modify your
server architecture to increase capacity.
The analysis of Mailstone results is an iterative
process of client (Mailstone client) and server tuning. The bottom
line is to determine whether the messaging solution can handle the type
of load expected in an acceptable manner.
Copyright 1998 Netscape Communications
Corporation. All rights reserved.