xSQL Storage Usage

Sometimes it is useful to see the amount of database memory or persistent storage space that is available in the database. xSQL provides the mem and memddl commands for this purpose.

For an overview see page xSQL Server Instrumentation

Command mem

The mem [-b|-k|-m|-g|-t|-p] command displays the amount of total and free storage in the database. The available storage is displayed in bytes (-b), Kilobytes (-k, default), Megabytes (-m), Gigabytes (-g), Terabytes (-t) or memory pages (-p). For example, the following displays memory usage for an in-memory database:

 
    XSQL>mem
    Total         Used               Free
    Mem :    102212            6      	     102205
     
    XSQL>mem -b
    Total         Used               Free
    Mem : 104665344         6656       	  104658688
     

The following for a persistent database:

 
    XSQL>mem
    Total            Used            Free
    Mem :    102154              12          102141
    Disk:       128             121
    Log :       833
     

Command memddl

Similarly the memddl command displays the memory reserved and used for database classes and indexes, and for the database dictionary. For example:

 
    XSQL>memddl
    Reserved             Used        Available
    Classes    :              100                1               99
    Indexes    :             1000                1              999
    Dict. size :             32Kb              1Kb             30Kb