Compacting databases – HP 3PAR StoreServ 7000 Storage User Manual

Page 114

Advertising
background image

Table 54 Sampling Policies (continued)

Default

Policy

24

Default number of hours to keep hi-res samples (in force by default for all systems
unless specified otherwise on an individual basis)

7

Default number of days to keep hourly samples (in force by default for all systems
unless specified otherwise on an individual basis)

7

Default number of days to keep Adaptive Optimization hourly samples (in force
by default for all systems unless specified otherwise on an individual basis)

366

Default number of days to keep daily samples (in force by default for all systems
unless specified otherwise on an individual basis)

6

Ratio of Hi-Res performance samples to Hi-Res space samples.

Typically space changes are slower than performance so space sampling can
be configured at a slower rate than performance sampling.

daily

Perform compaction of the database after next sample (SQLite only. Sampling
will be stopped and database will be unavailable for several minutes)

see

“Compacting Databases” (page 114)

(blank)

If there is a problem with sampling, send email to this address.

Email is only sent if the sampling problem requires the sampler service/daemon
to exit.

Compacting Databases

When some sampling policies are changed or when the number or sizes of systems being sampled
is reduced the size of the database may be reduced significantly.

If a MySQL or Oracle database is being used and there is a significant change in size, the
database’s tables do not automatically shrink. A compaction must be performed on the database
in order to recover the file space. To start a compaction on the database, change the policy labelled
Perform compaction of the database after next sample to now, daily or to the specific day of the
week depending on whether you want to perform the compaction now, immediately after each
daily sample or immediately after the daily sample on the specified day of the week.

If the policy value is set to now the compaction is done once and the value is automatically reset
to 0.

To achieve compaction with MySQL databases, System Reporter uses the OPTIMIZE command.
For Oracle databases System Reporter uses the ALTER TABLE SHRINK SPACE command. See your
SQLite, MySQL or Oracle database documentation for further information about database
compaction using these commands.

For MySQL and Oracle databases, compaction is done by an external process so that data sampling
can continue in parallel with database compaction. However, for SQLIte databases sampling is
suspended until the compaction is complete.

For MS SQL, the compaction is performed using the following procedure:

DBCC SHRINKDATABASE

( database_name [ , target_percent ]

[ , { NOTRUNCATE | TRUNCATEONLY } ]

)

DBCC SHRINKFILE

( { file_name | file_id }

{ [ , target_size ]

| [ , { EMPTYFILE | NOTRUNCATE | TRUNCATEONLY } ]

114

Configuring the System Reporter Policy Settings

Advertising