STATISTICS(SSM)
Shore Programmer's Manual - 18 September 95
NAME
statistics \- Shore Storage Manager performance information
SYNOPSIS
class sm_stats_info_t;
static rc_t
ss_m::gather_stats(sm_stats_info_t& stats, bool reset=false);
DESCRIPTION
The Shore Storage Manager keeps myriad statistics.
The statistics are available to higher layers of software
through the method
gather_stats.
Each statistic kept has a name and a
manifest constant of that name
for use with the generic statistics-gathering
programming interface described in
statistics(fc)
.
The names and descriptions of the statistics are listed
in sections below.
All the statistics are unsigned long integers except
where noted below.
Below each statistic is identified by the
manifest constant for the statistic and also by
its member name in the structure
sm_stats_info_t.
After gathering the storage manager statistics into
a
sm_stats_info_t,
the
sm_stats_info_t
can be used with the
w_statistics_t
package for display:
sm_stats_info_t s;
rc = gather_stats(s);
if(!rc) {
w_statistics_t stats << s;
cout << stats;
}
Set the argument
reset
of
gather_stats
to
true
if you want the statistics to be
cleared (set to zero)
after they are copied.
BUFFER POOL STATISTICS
- SM_rec_pin_cnt
- sm_stats_info_t::rec_pin_cnt.
Records pinned in the buffer pool.
(This counts the pinning events, not the distinct
records pinned.)
- SM_rec_unpin_cnt
- sm_stats_info_t::rec_unpin_cnt.
Records unpinned.
- SM_bt_find_cnt
- sm_stats_info_t::bt_find_cnt.
B-tree lookups (calls to ss_m::find_assoc());
- SM_page_fix_cnt
- sm_stats_info_t::page_fix_cnt.
Times pages were fixed in the buffer pool.
- SM_page_unfix_cnt
- sm_stats_info_t::page_unfix_cnt.
Times pages were unfixed.
B-TREE STATISTICS
- SM_bt_insert_cnt
- sm_stats_info_t::bt_insert_cnt.
B-tree inserts (calls to ss_m::create_assoc());
- SM_bt_remove_cnt
- sm_stats_info_t::bt_remove_cnt.
B-tree removes (calls to ss_m::destroy_assoc());
- SM_bt_scan_cnt
- sm_stats_info_t::bt_scan_cnt.
Number of B-tree scans started.
LOGICAL-ID STATISTICS
These will be zero if you do not use logical-IDs.
Logical IDs are stored in a B-tree index, and
recently used IDs are cached in a transient cache.
- SM_lid_lookups
- sm_stats_info_t::lid_lookups.
Times the logical-ID index was searched for an ID.
- SM_lid_remote_lookups
- sm_stats_info_t::lid_remote_lookups.
Times the index was searched for a second
time for indirect references.
- SM_lid_inserts
- sm_stats_info_t::lid_inserts.
Logical-IDs added to the index.
- SM_lid_removes
- sm_stats_info_t::lid_removes.
Logical-IDs removed from the index.
- SM_lid_cache_hits
- sm_stats_info_t::lid_cache_hits.
Times a logical-ID look-up request was satisfied
by the cache of recent requests, avoiding a
B-tree look-up.
PAGE OPERATIONS
- SM_page_alloc_cnt
- sm_stats_info_t::page_alloc_cnt.
Pages allocated from free pages in
allocated extents.
- SM_page_dealloc_cnt
- sm_stats_info_t::page_dealloc_cnt.
Pages deallocated. These pages are
free for re-allocation in the same store.
TRANSACTION STATISTICS
- SM_begin_xct_cnt
- sm_stats_info_t::begin_xct_cnt.
The number of transactions that were begun.
This includes the number that resulted from
chaining transactions.
- SM_commit_xct_cnt
- sm_stats_info_t::commit_xct_cnt.
The number of transactions that were committed.
This includes the number that resulted from
chaining transactions.
- SM_abort_xct_cnt
- sm_stats_info_t::abort_xct_cnt.
The number of transactions that were aborted.
- SM_rollback_savept_cnt
- sm_stats_info_t::rollback_savept_cnt.
The number of requests to roll back to a
save point, without rolling back the entire
transaction.
LOCK STATISTICS
The following statistics measure activity
in the lock table. Many of the statistics are
of interest only the the developers of Shore,
and are likely to be removed in future releases
of Shore.
- SM_unlock_request_cnt
- sm_stats_info_t::unlock_request_cnt.
High-level unlock requests.
- SM_lock_request_cnt
- sm_stats_info_t::lock_request_cnt.
High-level lock requests (could have been
satisfied with the lock cache or with the
lock table.)
- SM_lock_cache_hit_cnt
- sm_stats_info_t::lock_cache_hit_cnt.
The number of cache hits (avoiding request
to acquire locks through the lock table).
- SM_lock_acquire_cnt
- sm_stats_info_t::lock_acquire_cnt.
The number of times a request was made to
acquire a lock through the lock table (as opposed
to the lock cache).
- SM_lock_head_t_cnt
- sm_stats_info_t::bt_scan_cnt.
The number of
lock_head_t
structures put in the table.
- SM_lock_request_t_cnt
- sm_stats_info_t::lock_request_t_cnt.
The number of
lock_request_t
structures chained from a
lock_head_t.
- SM_lock_query_cnt
- sm_stats_info_t::lock_query_cnt.
The number of times the lock table was
queried about a given lock.
The following statistics measure collisions
from the lock table hash function.
They are generally not of interest to the
user, but they might be of interest to someone
who is building a value-added server and
might consider using a different hash function.
Only buckets of non-zero length are counted
when these statistics are computed.
They are all zero when there is no transaction
active, since the lock table is empty at that time.
These statistics are computed when
gather_stats
is called;
it traverses the entire lock table, so it
should not be used habitually when transactions
are active.
- SM_lock_bucket_cnt
- sm_stats_info_t::lock_bucket_cnt.
The total number of buckets used.
This is some fraction of the total number of buckets
available, which is determined by the value of the
option
sm_locktablesize.
- SM_lock_max_bucket_len
- sm_stats_info_t::lock_max_bucket_len.
The largest bucket in use.
- SM_lock_min_bucket_len
- sm_stats_info_t::lock_min_bucket_len.
The smallest bucket in use.
- SM_lock_mode_bucket_len
- sm_stats_info_t::lock_mode_bucket_len.
The mode of the lengths of the buckets used.
- SM_lock_mean_bucket_len
- float sm_stats_info_t::lock_mean_bucket_len.
The mean bucket length (of the buckets used).
- SM_lock_var_bucket_len
- float sm_stats_info_t::lock_var_bucket_len.
The variance of the bucket length (of the buckets used).
- SM_lock_std_bucket_len
- float sm_stats_info_t::lock_std_bucket_len.
The Standard deviation of the bucket length (of the buckets used).
OPERATIONS ON LOCAL DATA VOLUMES
- SM_vol_reads
- sm_stats_info_t::vol_reads.
Lowest-level read requests made to the
`diskrw' process, which effects non-blocking disk I/O
for data volumes.
- SM_vol_writes
- sm_stats_info_t::vol_writes.
Lowest-level write requests made to the
`diskrw' process, which effects non-blocking disk I/O
for data volumes.
OPERATIONS ON THE LOG
- SM_log_records_generated
- sm_stats_info_t::log_records_generated.
The number of log records written.
- SM_log_bytes_generated
- sm_stats_info_t::log_bytes_generated.
The number of bytes written to the log.
- SM_log_sync_cnt
- sm_stats_info_t::log_sync_cnt.
The number of times the log was `sync'-ed, meaning
flushed to disk (done frequently when the log is
a Unix file). (Later releases will permit the
log to be a raw device.)
VERSION
This manual page applies to Version 0.9.3 (Beta) of theShore software.
SPONSORSHIP
The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
COPYRIGHT
Copyright (c) 1994, 1995 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.SEE ALSO
options(svas)
,
statistics(svas)
,
and
statistics(fc)