Chapter 7. Operations and monitoring 155
You can also manually suspend and resume the placement service balancing mechanism
with the xsadmin -suspendBalancing and xsadmin -resumeBalancing commands (see 7.3.2,
“Useful xsadmin commands” on page 157).
Understanding placement during shutdown
Similar to start, the placement service begins to compute a new placement plan on every
container stop event. During a container stop, the placement service first puts the container
into an unassigned category and computes a placement plan to accommodate all existing
shards on that container as part of a
teardown process.
When stopping a container using the stopOGServer.sh script, it invokes a teardown
command, which allows the placement service to take these actions
before the actual
container process terminates. The same action applies when you use the WebSphere
Application Server system management interface to stop a container server.
When stopping a number of container servers at the same time using a separate
stopOgServer command for each container, the placement service receives a stop event for
each container. However, upon receiving the first stop event, the placement service cannot
know that more stop events will follow. It has to treat each stop event as an isolated event.
Use stopOgServer with a list of containers or use the xsadmin -teardown command to stop
multiple container servers (see “xsadmin -teardown” on page 160). This step ensures that the
placement service receives a batch of container stop events. As a result, it can compute just
one new placement plan and execute this plan, thus minimizing the amount of overhead.
7.3 The xsadmin command-line tool
It is clear from the previous section that the behavior of the placement service determines
what happens in the WebSphere eXtreme Scale environment. To understand what the
placement service does, IBM ships a sample command-line utility called xsadmin that can be
used for a number of functions:
Use it after starting or stopping containers to confirm that the placement service is working
as expected.
Use it to validate that clients are able to successfully store data into the grid.
Use it to see how many entries are in each partition. Use this information as an estimate of
how much memory certain grids (or individual mapsets) are using or the distribution of
memory across grids in the container if standard key/values are being used with a known
size in each grid.
The numInitialContainers option: Setting the numInitialContainers option does not
affect failover scenarios or any operation after the grid is up. The placement service still
computes a placement plan to handle failed or stopped containers when the number of
containers falls below numInitialContainers.
Using the -teardown command: When using the xsadmin.sh -teardown command in a
WebSphere environment, the command shuts down the WebSphere eXtreme Scale
containers within the WebSphere process, but it does not stop the WebSphere Application
Server process. You need to follow the invocation of the -teardown command with a stop
from normal WebSphere administrative procedures.