Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Lexical for Cache usage

 
SOLVED
Go to solution
Peter Zeiszler
Trusted Contributor

Lexical for Cache usage

I use DCL scripts for generating performance reports (ie. memory usage, etc). I haven't found a good lexical for finding out how much of the memory is in usage for cache.

Does anyone know of one (documented or undocumented) that is avaiable? I currently do a "show mem/cache" and parse the data from that and have to do it for alpha and itanium.
7 REPLIES
labadie_1
Honored Contributor
Solution

Re: Lexical for Cache usage

Hello Peter

Have you seen this procedure recently posted on dcl.openvms.org, on a related subject ?

http://dcl.openvms.org/stories.php?story=08/09/27/0360566
Robert Gezelter
Honored Contributor

Re: Lexical for Cache usage

Peter,

Have T4 been considered as a tool to collect the performance data? Then it can be extracted from the resulting CSV file.

- Bob Gezelter, http://www.rlgsc.com
Peter Zeiszler
Trusted Contributor

Re: Lexical for Cache usage

Didn't see that one. Its not bad. I have done similiar things when we were trying to find out what actually got into cache.

On this quest I was after was the "In use" from the show mem/cache.
------------------------
System Memory Resources on 29-SEP-2008 15:01:49.46

Extended File Cache (Time of last reset: 18-JUN-2008 13:23:45.60)
Allocated (GBytes) 1.46 Maximum size (GBytes) 3.00
Free (GBytes) 0.00 Minimum size (GBytes) 0.00
In use (GBytes) 1.46 Percentage Read I/Os 63%
------------------
This example shows only 1.46 Gig used by Cache but it could use up to 3Gig. On some systems that value might report in Meg cause system is using the memory and doesn't have enough available for cache to use it.

Mainly came up because we had some performance hits on our backups. Turned out we had some users processes that they didn't keep track of that ate up memory and took away from Cache. Once we nuked those processes we got our backups performance back. We were looking at tracking xfc cache to see if we could get a bases for trending and possible performance improvements (like maybe more memory).
Peter Zeiszler
Trusted Contributor

Re: Lexical for Cache usage

Robert - We do run T4 on the majority of our systems. Was looking at feeding the value into our current BB (Big Brother) environment where we use RRD to perform trending charts for us.
Hein van den Heuvel
Honored Contributor

Re: Lexical for Cache usage

I would also recommend having T4 running and extracting (CSVPNG!)
, or visualizing (TLVIZ), the XFC counters from there.

For my customers I run a twice daily batch job much like the one Labadie posted to grab SHOW MEM/CACH/FULL and SHOW MEM/CACH=TOP...

I suggest running it twice a day (or more often) to SUBTRACT the counters, to get a per-interval number.
This as unlike the 'full counters', the per file counts can not be reset with SET CACHE /RESET.

Labadie... be VERY CAREFUL with the VOLUME=*.

For a serious production system this is likely to be too intense.

I've seen live box 32-CPU box with thousands of sessions go into a 'freeze' for seconds while this command was completing. It's a little scary to watch to say the least. I would suggest a loop over devices a list of devices, with a minor delay (100 milli-second?) between each. Just enough to allow the system to keep on breathing.

At the 2008 OpenVMS Bootcamp I presented a session to report on this SHOW MEMORY /CACHE.
Atttached a PERL script to summarize a collection of daily, per-node, SHOW MEM/CACHE outputs into a 'line per day' CSV file which you can then visualize with EXCEL or T4's TLVIZ

Enjoy!

Hein van den Heuvel
HvdH Performance Consulting.
Hein van den Heuvel
Honored Contributor

Re: Lexical for Cache usage

Just to highlight the Gbytes vs Mbytes handling in the prior attachment.

Sample inputs:

In use (MBytes) 747.95
versus
In use (GBytes) 11.16


while () { # loop over output
:
if (/^\s+In use .(.).*\)\s+(\S+).*\s(\d+)/)
{ $Allocated = ($1 eq "G")? $2 : $2/1024; ...

That regular expression read in slow motion:

/^\s+In use .(.).*\)\s+(\S+).*\s(\d+)/)

^\s+In use # Begin a line with one or more spaces and "In use"

.(.).*\) # a space, anything (open paren), a character to be remembered in $1, some characters and closing paren)

\s+(\S+) # whitespace and remember some none-whitespace (numbers + decimal seperator) into $2

.*\s(\d+)/ # some more characters, a space and remember a series of decimals into $3 (percentage).


And...

$Allocated = ($1 eq "G")? $2 : $2/1024;

Reads

Make the allocated be the saved $2 just like that the saved $1 was "G", if it is G then divide by 1024 turing Mbytes into a (small number) of Gbytes


Hein.
labadie_1
Honored Contributor

Re: Lexical for Cache usage

Hein

I was unaware of this problem with
$ show mem/cache=(volume=*...)

I will modify the procedure.