SystemStatistics

Ian Hinder

\( \)Date: 2010/04/06 11:00:00 \( \)

Abstract

Thorn SystemStatistics collects information about the system on which a Cactus process is running and stores it in Cactus variables. These variables can then be output and reduced using the standard Cactus methods such as IOBasic and IOScalar.

1 Purpose

When running a Cactus simulation, there are often features of the system on which it is running which can affect the simulation. For example, Cactus processes take a certain amount of memory, and if this exceeds the memory available on the system, the Cactus process will either start to swap, significantly reducing performance, or will terminate. It can be useful to determine quantities such as memory usage of a Cactus process, and that is the purpose of this thorn. The thorn currently provides grid arrays which are filled with memory-related information.

2 SystemStatistics Parameters

This thorn has no parameters.

3 Examples

IOBasic::outInfo_every                  = 256
IOBasic::outInfo_reductions             = "minimum maximum"
IOBasic::outInfo_vars                   = "SystemStatistics::maxrss_mb"

IOScalar::outScalar_every               = 256
IOScalar::outScalar_reductions          = "minimum maximum average"
IOScalar::outScalar_vars                = "SystemStatistics::process_memory_mb"

The resulting screen output would look like this:

-----------------------------------------
Iteration      Time | *TISTICS::maxrss_mb
                    |   minimum   maximum
-----------------------------------------
        0     0.000 |        52        54
      256     0.005 |        53        55
      512     0.010 |        53        55
      768     0.015 |        53        55
     1024     0.020 |        53        55

and the reduced scalar output in systemstatistics::process_memory_mb.maximum.asc would look like this:

# SYSTEMSTATISTICS::maxrss_mb (systemstatistics::process_memory_mb)
# 1:iteration 2:time 3:data
# data columns: 3:maxrss_mb 4:majflt_mb 5:arena_mb 6:ordblks_mb 7:hblks_mb 8:hblkhd_mb 9:uordblks_mb 10:fordblks_mb 11:keepcost_mb
0 0 54 7 50 0 0 0 39 12 11
256 0.00498610682309355 55 7 51 0 0 0 39 12 11
512 0.0099722136461871 55 7 51 0 0 0 39 12 11
768 0.0149583204692806 55 7 51 0 0 0 39 12 11
1024 0.0199444272923742 55 7 51 0 0 0 39 12 11

4 Comments

5 Parameters

6 Interfaces

General

Implements:

systemstatistics

Grid Variables

6.0.1 PRIVATE GROUPS




  Group Names    Variable Names    Details   




process_memory   compact0
maxrss   descriptionProcess memory statistics
majflt   dimensions1
arena   distributionCONSTANT
ordblks   group typeARRAY
hblks   size1
hblkhd   tagsCheckpoint=”no”
uordblks   timelevels1
fordblks  variable typeREAL




process_memory_mb   compact0
maxrss_mb   descriptionRun memory statistics in MB
majflt_mb   dimensions1
arena_mb   distributionCONSTANT
ordblks_mb   group typeARRAY
hblks_mb   size1
hblkhd_mb   tagsCheckpoint=”no”
uordblks_mb   timelevels1
fordblks_mb  variable typeINT




process_memory_kb   compact0
maxrss_kb   descriptionRun memory statistics in KB
majflt_kb   dimensions1
arena_kb   distributionCONSTANT
ordblks_kb   group typeARRAY
hblks_kb   size1
hblkhd_kb   tagsCheckpoint=”no”
uordblks_kb   timelevels1
fordblks_kb  variable typeINT




7 Schedule

This section lists all the variables which are assigned storage by thorn CactusUtils/SystemStatistics. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage

 

Always:  
process_memory process_memory_mb process_memory_kb 
   

Scheduled Functions

CCTK_ANALYSIS

  systemstatistics_collect

  collect system statistics

 

 Language:c
 Options: global
 Type: function
 Writes: systemstatistics::process_memory
   process_memory_mb
   process_memory_kb