<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613487#M18085</link>
    <description>&lt;!--!*#--&gt;Following on from my previous thread about CONVERT /SORT versus SORT + CONVERT /NOSORT, another&lt;BR /&gt;problem has arrived in my lap...&lt;BR /&gt;&lt;BR /&gt;A job which post-processes RDB dumped tables (RMS indexed files) to generate a file with records&lt;BR /&gt;formed from related parts of these tables, has started to slow down.&lt;BR /&gt;&lt;BR /&gt;[There is one main table file which is sorted in order, and depending on the field/columnar values on each row/record, will&lt;BR /&gt;determine whether or not the C program has to check other dumped table files]&lt;BR /&gt;&lt;BR /&gt;Unfortunately, there's no evidence to back this up, just people's vague recollection of how quick&lt;BR /&gt;they think it used to be.&lt;BR /&gt;&lt;BR /&gt;Looking at the job, the first thing I found is that the output file it generates, was very&lt;BR /&gt;fragmented - between 5000 and 7000 fragments of 200 to 900 blocks each.&lt;BR /&gt;&lt;BR /&gt;To see if the fragmentation was the main issue, I worked around this by doing the following:&lt;BR /&gt;&lt;BR /&gt;$ SET RMS_DEFAULT /EXTEND_SIZE=65376&lt;BR /&gt;$ COPY NLA0: dev:[dir]output_filename.ext /ALLOCATION=11000000 /CONTIGUOUS&lt;BR /&gt;&lt;BR /&gt;The device on which the file is created has a cluster size of 288 blocks, and 65376 was the highest&lt;BR /&gt;multiple of 288 possible that was &amp;lt;= 65535.&lt;BR /&gt;&lt;BR /&gt;The COPY pre-allocates a contiguous file for the C program which was updated to open the file in&lt;BR /&gt;append mode.&lt;BR /&gt;&lt;BR /&gt;After running the new job, it was obvious from the following:&lt;BR /&gt;&lt;BR /&gt;$ SHOW MEMORY /CACHE=FILE=dev:[dir]main_table.DAT&lt;BR /&gt;&lt;BR /&gt;that whilst the main input table file was being cached, virtually no reads were being serviced by&lt;BR /&gt;the XFC from read aheads, and virutally all were read throughs.&lt;BR /&gt;&lt;BR /&gt;I momentarily forgot that whilst the main input table file is an RMS indexed sequential file, it is&lt;BR /&gt;being read sequentially by the C program using simple fgets() calls.&lt;BR /&gt;&lt;BR /&gt;Thinking that the file was perhaps not sorted in order after all, I TYPE/PAGEd it (given that it&lt;BR /&gt;has ~49m records in it, I wanted some control over when my ^C would get picked up), then held the&lt;BR /&gt;RETURN key down for a good minute or so.&lt;BR /&gt;&lt;BR /&gt;The records appeared to be in order, but what I did notice was that after this, the SHOW MEMORY&lt;BR /&gt;/CACHE indicated that every single read was being serviced as a read ahead from the XFC.&lt;BR /&gt;&lt;BR /&gt;After about 90mins, I killed the job, and found that the XFC cache hit rate was at ~90% (obviously,&lt;BR /&gt;it would never get to 100%, because of the initial ~14,000 which were treated as read throughs).&lt;BR /&gt;&lt;BR /&gt;I then ran the job again, but without using TYPE /PAGE on the main table file.&lt;BR /&gt;&lt;BR /&gt;It has now been running for almost as long as the first run, but the cache hit rate is 54%, and&lt;BR /&gt;although the read ahead counter value displayed by SHOW MEMORY /CACHE is increasing, so is the&lt;BR /&gt;read through counter - approximately 1 in 4 reads end up as READ AHEAD.&lt;BR /&gt;&lt;BR /&gt;Now, I know that this is only 2 individual runs, and hardly what you'd call exhaustive evidence...&lt;BR /&gt;&lt;BR /&gt;However, I'm going to go out on a limb here, and say that without my TYPE/PAGE, either:&lt;BR /&gt;&lt;BR /&gt;a) the C program is largely running ahead of the XFC cache in reading the file contents, so most&lt;BR /&gt;reads won't cause sequential read ahead of the file to occur (unless from outside interference,&lt;BR /&gt;such as me doing TYPE /PAGE)&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;b) however XFC determines that something is performing sequential reads doesn't work (in this&lt;BR /&gt;particular scenario).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For what it's worth, the file attributes are this:&lt;BR /&gt;&lt;BR /&gt;Size:     13956192/13956192   Owner:    [SYSTEM,*]&lt;BR /&gt;Created:     5-APR-2010 11:01:01.32&lt;BR /&gt;Revised:     6-APR-2010 18:24:21.06 (4)&lt;BR /&gt;Expires:    &lt;NONE specified=""&gt;&lt;BR /&gt;Backup:      7-APR-2010 02:34:38.75&lt;BR /&gt;Effective:  &lt;NONE specified=""&gt;&lt;BR /&gt;Recording:  &lt;NONE specified=""&gt;&lt;BR /&gt;Accessed:   &lt;NONE specified=""&gt;&lt;BR /&gt;Attributes: &lt;NONE specified=""&gt;&lt;BR /&gt;Modified:   &lt;NONE specified=""&gt;&lt;BR /&gt;Linkcount:  1&lt;BR /&gt;File organization:  Indexed, Prolog: 3, Using 3 keys&lt;BR /&gt;                             In 2 areas&lt;BR /&gt;Shelved state:      Online &lt;BR /&gt;Caching attribute:  Writethrough&lt;BR /&gt;File attributes:    Allocation: 13956192, Extend: 65520, Maximum bucket size: 18&lt;BR /&gt;                    Global buffer count: 0, No version limit&lt;BR /&gt;                    Contiguous best try&lt;BR /&gt;Record format:      Variable length, maximum 200 bytes, longest 0 bytes&lt;BR /&gt;Record attributes:  Carriage return carriage control&lt;BR /&gt;RMS attributes:     None&lt;BR /&gt;Journaling enabled: None&lt;BR /&gt;File protection:    System:RWED, Owner:RWED, Group:RE, World:&lt;BR /&gt;Access Cntrl List:  None&lt;BR /&gt;Client attributes:  None&lt;BR /&gt;&lt;BR /&gt;Total of 1 file, 13956192/13956192 blocks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The last SHOW MEMORY /CACHE command gave the following results:&lt;BR /&gt;Extended File Cache File Statistics:&lt;BR /&gt;&lt;BR /&gt;_dev:[dir]table.DAT;1 (open) &lt;BR /&gt; Caching is enabled, active caching mode is Write Through&lt;BR /&gt;    Allocated pages           5122     Total QIOs             144399&lt;BR /&gt;    Read hits                79682     Virtual reads          144399&lt;BR /&gt;    Virtual writes               0     Hit rate                   55 %&lt;BR /&gt;    Read aheads              22443     Read throughs          144399&lt;BR /&gt;    Write throughs               0     Read arounds                0&lt;BR /&gt;                                       Write arounds               0&lt;BR /&gt;&lt;BR /&gt;Total of 1 file for this volume&lt;BR /&gt;&lt;BR /&gt;Write Bitmap (WBM) Memory Summary&lt;BR /&gt;  Local bitmap count:    93     Local bitmap memory usage (MB)          8.40&lt;BR /&gt;  Master bitmap count:   96     Master bitmap memory usage (MB)         8.27&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is the fact that the Global Buffer Count set to 0 and/or the fact that the file is an RMS indexed&lt;BR /&gt;file being read using the C RTL fgets() partly to blame here, or is something else going on?&lt;BR /&gt;&lt;BR /&gt;Clearly, I'm reluctant to have a second concurrent job run at the same time as this main job,&lt;BR /&gt;simply to TYPE the table file, then be killed after a minute, to ensure that a sufficient&lt;BR /&gt;quantity of the file is cached to permit the XFC to service read requests.&lt;BR /&gt;&lt;BR /&gt;If anybody has any thoughts/suggestions, I'd be most grateful.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;[Grrr, hit some sequence on the keyboard, causing IE to go back a page, and lose 90% of this&lt;BR /&gt;post, so had to go back and do it from scratch again in notepad...]&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;</description>
    <pubDate>Wed, 07 Apr 2010 10:44:03 GMT</pubDate>
    <dc:creator>Mark Corcoran</dc:creator>
    <dc:date>2010-04-07T10:44:03Z</dc:date>
    <item>
      <title>0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613487#M18085</link>
      <description>&lt;!--!*#--&gt;Following on from my previous thread about CONVERT /SORT versus SORT + CONVERT /NOSORT, another&lt;BR /&gt;problem has arrived in my lap...&lt;BR /&gt;&lt;BR /&gt;A job which post-processes RDB dumped tables (RMS indexed files) to generate a file with records&lt;BR /&gt;formed from related parts of these tables, has started to slow down.&lt;BR /&gt;&lt;BR /&gt;[There is one main table file which is sorted in order, and depending on the field/columnar values on each row/record, will&lt;BR /&gt;determine whether or not the C program has to check other dumped table files]&lt;BR /&gt;&lt;BR /&gt;Unfortunately, there's no evidence to back this up, just people's vague recollection of how quick&lt;BR /&gt;they think it used to be.&lt;BR /&gt;&lt;BR /&gt;Looking at the job, the first thing I found is that the output file it generates, was very&lt;BR /&gt;fragmented - between 5000 and 7000 fragments of 200 to 900 blocks each.&lt;BR /&gt;&lt;BR /&gt;To see if the fragmentation was the main issue, I worked around this by doing the following:&lt;BR /&gt;&lt;BR /&gt;$ SET RMS_DEFAULT /EXTEND_SIZE=65376&lt;BR /&gt;$ COPY NLA0: dev:[dir]output_filename.ext /ALLOCATION=11000000 /CONTIGUOUS&lt;BR /&gt;&lt;BR /&gt;The device on which the file is created has a cluster size of 288 blocks, and 65376 was the highest&lt;BR /&gt;multiple of 288 possible that was &amp;lt;= 65535.&lt;BR /&gt;&lt;BR /&gt;The COPY pre-allocates a contiguous file for the C program which was updated to open the file in&lt;BR /&gt;append mode.&lt;BR /&gt;&lt;BR /&gt;After running the new job, it was obvious from the following:&lt;BR /&gt;&lt;BR /&gt;$ SHOW MEMORY /CACHE=FILE=dev:[dir]main_table.DAT&lt;BR /&gt;&lt;BR /&gt;that whilst the main input table file was being cached, virtually no reads were being serviced by&lt;BR /&gt;the XFC from read aheads, and virutally all were read throughs.&lt;BR /&gt;&lt;BR /&gt;I momentarily forgot that whilst the main input table file is an RMS indexed sequential file, it is&lt;BR /&gt;being read sequentially by the C program using simple fgets() calls.&lt;BR /&gt;&lt;BR /&gt;Thinking that the file was perhaps not sorted in order after all, I TYPE/PAGEd it (given that it&lt;BR /&gt;has ~49m records in it, I wanted some control over when my ^C would get picked up), then held the&lt;BR /&gt;RETURN key down for a good minute or so.&lt;BR /&gt;&lt;BR /&gt;The records appeared to be in order, but what I did notice was that after this, the SHOW MEMORY&lt;BR /&gt;/CACHE indicated that every single read was being serviced as a read ahead from the XFC.&lt;BR /&gt;&lt;BR /&gt;After about 90mins, I killed the job, and found that the XFC cache hit rate was at ~90% (obviously,&lt;BR /&gt;it would never get to 100%, because of the initial ~14,000 which were treated as read throughs).&lt;BR /&gt;&lt;BR /&gt;I then ran the job again, but without using TYPE /PAGE on the main table file.&lt;BR /&gt;&lt;BR /&gt;It has now been running for almost as long as the first run, but the cache hit rate is 54%, and&lt;BR /&gt;although the read ahead counter value displayed by SHOW MEMORY /CACHE is increasing, so is the&lt;BR /&gt;read through counter - approximately 1 in 4 reads end up as READ AHEAD.&lt;BR /&gt;&lt;BR /&gt;Now, I know that this is only 2 individual runs, and hardly what you'd call exhaustive evidence...&lt;BR /&gt;&lt;BR /&gt;However, I'm going to go out on a limb here, and say that without my TYPE/PAGE, either:&lt;BR /&gt;&lt;BR /&gt;a) the C program is largely running ahead of the XFC cache in reading the file contents, so most&lt;BR /&gt;reads won't cause sequential read ahead of the file to occur (unless from outside interference,&lt;BR /&gt;such as me doing TYPE /PAGE)&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;b) however XFC determines that something is performing sequential reads doesn't work (in this&lt;BR /&gt;particular scenario).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For what it's worth, the file attributes are this:&lt;BR /&gt;&lt;BR /&gt;Size:     13956192/13956192   Owner:    [SYSTEM,*]&lt;BR /&gt;Created:     5-APR-2010 11:01:01.32&lt;BR /&gt;Revised:     6-APR-2010 18:24:21.06 (4)&lt;BR /&gt;Expires:    &lt;NONE specified=""&gt;&lt;BR /&gt;Backup:      7-APR-2010 02:34:38.75&lt;BR /&gt;Effective:  &lt;NONE specified=""&gt;&lt;BR /&gt;Recording:  &lt;NONE specified=""&gt;&lt;BR /&gt;Accessed:   &lt;NONE specified=""&gt;&lt;BR /&gt;Attributes: &lt;NONE specified=""&gt;&lt;BR /&gt;Modified:   &lt;NONE specified=""&gt;&lt;BR /&gt;Linkcount:  1&lt;BR /&gt;File organization:  Indexed, Prolog: 3, Using 3 keys&lt;BR /&gt;                             In 2 areas&lt;BR /&gt;Shelved state:      Online &lt;BR /&gt;Caching attribute:  Writethrough&lt;BR /&gt;File attributes:    Allocation: 13956192, Extend: 65520, Maximum bucket size: 18&lt;BR /&gt;                    Global buffer count: 0, No version limit&lt;BR /&gt;                    Contiguous best try&lt;BR /&gt;Record format:      Variable length, maximum 200 bytes, longest 0 bytes&lt;BR /&gt;Record attributes:  Carriage return carriage control&lt;BR /&gt;RMS attributes:     None&lt;BR /&gt;Journaling enabled: None&lt;BR /&gt;File protection:    System:RWED, Owner:RWED, Group:RE, World:&lt;BR /&gt;Access Cntrl List:  None&lt;BR /&gt;Client attributes:  None&lt;BR /&gt;&lt;BR /&gt;Total of 1 file, 13956192/13956192 blocks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The last SHOW MEMORY /CACHE command gave the following results:&lt;BR /&gt;Extended File Cache File Statistics:&lt;BR /&gt;&lt;BR /&gt;_dev:[dir]table.DAT;1 (open) &lt;BR /&gt; Caching is enabled, active caching mode is Write Through&lt;BR /&gt;    Allocated pages           5122     Total QIOs             144399&lt;BR /&gt;    Read hits                79682     Virtual reads          144399&lt;BR /&gt;    Virtual writes               0     Hit rate                   55 %&lt;BR /&gt;    Read aheads              22443     Read throughs          144399&lt;BR /&gt;    Write throughs               0     Read arounds                0&lt;BR /&gt;                                       Write arounds               0&lt;BR /&gt;&lt;BR /&gt;Total of 1 file for this volume&lt;BR /&gt;&lt;BR /&gt;Write Bitmap (WBM) Memory Summary&lt;BR /&gt;  Local bitmap count:    93     Local bitmap memory usage (MB)          8.40&lt;BR /&gt;  Master bitmap count:   96     Master bitmap memory usage (MB)         8.27&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is the fact that the Global Buffer Count set to 0 and/or the fact that the file is an RMS indexed&lt;BR /&gt;file being read using the C RTL fgets() partly to blame here, or is something else going on?&lt;BR /&gt;&lt;BR /&gt;Clearly, I'm reluctant to have a second concurrent job run at the same time as this main job,&lt;BR /&gt;simply to TYPE the table file, then be killed after a minute, to ensure that a sufficient&lt;BR /&gt;quantity of the file is cached to permit the XFC to service read requests.&lt;BR /&gt;&lt;BR /&gt;If anybody has any thoughts/suggestions, I'd be most grateful.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;[Grrr, hit some sequence on the keyboard, causing IE to go back a page, and lose 90% of this&lt;BR /&gt;post, so had to go back and do it from scratch again in notepad...]&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;&lt;/NONE&gt;</description>
      <pubDate>Wed, 07 Apr 2010 10:44:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613487#M18085</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-04-07T10:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613488#M18086</link>
      <description>Hello Mark, &lt;BR /&gt;&lt;BR /&gt;That sure is long description, and I coudl not always follow it they way I would have liked to, but at least we have some pertinent data. Good!.&lt;BR /&gt;I'll takes a first reply to clear some crud, and then try to get to the real problem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[There is one main table file which is sorted in order, and depending on the field/columnar values on each row/record, will&lt;BR /&gt;determine whether or not the C program has to check other dumped table files]&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;  people's vague recollection of how quick&lt;BR /&gt;they think it used to be.&lt;BR /&gt;&lt;BR /&gt;Too late now, but sprinkle your programs liberally with LIB$SHOW_TIMER!&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; the output file it generates, was very fragmented&lt;BR /&gt;&lt;BR /&gt;That can certainly cause unpredictable run times. pre-allocate, perhaps based on input file size, and max extend (64000, 65535, whatever).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; $ SET RMS_DEFAULT /EXTEND_SIZE=65376&lt;BR /&gt;&lt;BR /&gt;Fine for a process. But too much if done system wide. Slows down tasks like unzipping many little files.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; $ COPY NLA0: dev:[dir]output_filename.ext /ALLOCATION=11000000 /CONTIGUOUS&lt;BR /&gt;&lt;BR /&gt;Excellent. If contiguous then extend size is irrelevant.&lt;BR /&gt;I uses to use COPY NL: all the time myself for that purpose.&lt;BR /&gt;Since 8.3 I use the inline FDL strings:&lt;BR /&gt;&lt;BR /&gt;$cre/fdl="file; contiguous yes; allo 12345678"/log x.x&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;highest multiple of 288 possible that was &amp;lt;= 65535.&lt;BR /&gt;&lt;BR /&gt;Nice thought/touch, but largely irrelevant. OpenVMS has no choice but to round up.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;  The COPY pre-allocates a contiguous file for the C program which was updated to open the file in&lt;BR /&gt;append mode.&lt;BR /&gt;&lt;BR /&gt;Excellent&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; input table file is an RMS indexed sequential file, it is being read sequentially by the C program using simple fgets() calls.&lt;BR /&gt;&lt;BR /&gt;No matter. Those maps to RMS SYS$GET calls.&lt;BR /&gt;&lt;BR /&gt;Next step is probably to SET FILE/STAT on the existing files, in an output, and use ANAL/SYS.. SHOW PROC/RMS=FSB or my RMS_STATS tool to display all counters.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Thinking that the file was perhaps not sorted in order after all&lt;BR /&gt;&lt;BR /&gt;An indexed file is sorted by primary key. No ifs or buts about that.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;, I TYPE/PAGEd it (given that it&lt;BR /&gt;has ~49m records in it, I wanted some control over when my ^C would get picked up), then held the&lt;BR /&gt;RETURN key down for a good minute or so.&lt;BR /&gt;&lt;BR /&gt;How crude.&lt;BR /&gt;$ perl -pe "last if $. &amp;gt; 10000" &amp;gt; nl:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; The records appeared to be in order, but what I did notice was that after this, the SHOW MEMORY&lt;BR /&gt;/CACHE indicated that every single read was being serviced as a read ahead from the XFC.&lt;BR /&gt;&lt;BR /&gt;As pre-loaded by the program.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; it would never get to 100%, because of the initial ~14,000 which were treated as read throughs).&lt;BR /&gt;&lt;BR /&gt;Read-throughs is just through the cache, not through to the disk.&lt;BR /&gt;Read to the disk = reads-hits + ahead.&lt;BR /&gt;&lt;BR /&gt;See HELP SHOW MEMORY... deep down:&lt;BR /&gt;           7 Read throughs       Number of Virtual Reads that are capable of being satisfied by the extended file cache.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Size:     13956192/13956192   Owner:  &lt;BR /&gt;&lt;BR /&gt;Is that the table/driver file?&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&amp;gt;&amp;gt; Is the fact that the Global Buffer Count set to 0 and/or the fact that the file is an RMS indexed&lt;BR /&gt;file being read using the C RTL fgets() partly to blame here, or is something else going on?&lt;BR /&gt;&lt;BR /&gt;Nah.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Clearly, I'm reluctant to have a second concurrent job run at the same time as this main job, simply to TYPE the table file, then be killed after a minute, to ensure that a sufficient&lt;BR /&gt;quantity of the file is cached to permit the XFC to service read requests.&lt;BR /&gt;&lt;BR /&gt;That's not so clear to me.&lt;BR /&gt;Clearly TYPE is a silly tool for this, but you know more that the XFC can guess.&lt;BR /&gt;So launching something to pre-read is not that crazy an idea for predictable jobs with critical run time requirement.&lt;BR /&gt;&lt;BR /&gt;I once created a 'read-ahead-and-keep-ahead' tool, just for that reason.&lt;BR /&gt;It woudl pre-read N buckets worth of data. The used an RMS compatible bucket lock with blocking AST on the first to detectt 'interest in a bucket'. When the AST triggered on  bucket M, grab a lock for the next (M+1), release M, read M + N + 1.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; If anybody has any thoughts/suggestions, I'd be most grateful.&lt;BR /&gt;&lt;BR /&gt;- RMS stats.&lt;BR /&gt;- Be sure to watch activity on those other files.&lt;BR /&gt;- Engage a professional in this space if it is really critical.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein van den Heuvel ( at gmail dot com )&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:27:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613488#M18086</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-07T13:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613489#M18087</link>
      <description>Meant to open with&lt;BR /&gt;&lt;BR /&gt;0% hit rate is perfectly normal for&lt;BR /&gt;- files that have not been read/written in a while.&lt;BR /&gt;- files that well exceed the cache capacity and a read sequentially&lt;BR /&gt;- when nochace is in effect&lt;BR /&gt;- when IOs are done larger than the max-cache IO size.&lt;BR /&gt;- when concurrent updates are happening on other nodes in the cluster.&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613489#M18087</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-07T13:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613490#M18088</link>
      <description>At present &lt;BR /&gt;- files that well exceed the cache capacity and a read sequentially&lt;BR /&gt;&lt;BR /&gt;looks likely but how big is the cache on this system, and what aged version of VMS is being used?</description>
      <pubDate>Wed, 07 Apr 2010 13:40:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613490#M18088</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-04-07T13:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613491#M18089</link>
      <description>Hein:&lt;BR /&gt;&amp;gt;Too late now, but sprinkle your programs liberally with LIB$SHOW_TIMER!&lt;BR /&gt;I know how much the bean-counters like to have stats, so I always try to make sure I get timing info for various stages of programs (can also be useful for myself too).&lt;BR /&gt;&lt;BR /&gt;Alas, this is someone else's code, developered some time ago, and the concern was more with getting it working than making it perfect ;-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; $ SET RMS_DEFAULT /EXTEND_SIZE=65376&lt;BR /&gt;&amp;gt;Fine for a process. But too much if done system wide&lt;BR /&gt;&lt;BR /&gt;Don't worry, it was only for this one job, as a test :-)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Excellent. If contiguous then extend size is irrelevant.&lt;BR /&gt;&lt;BR /&gt;I'd wondered about this - assuming that the next highest contiguous block on the disk was 130752 blocks, and the RMS extend size had been set to 65376, I'm guessing that if exactly 130752 blocks were required, then:&lt;BR /&gt;a) they'd be allocated in two logical single operations&lt;BR /&gt;b) as far as BITMAP.SYS is concerned, the fact that there are two groups of 65376 blocks is irrelevant, because they are "next to each other", so would appear as a single fragment...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;highest multiple of 288 possible that was &amp;lt;= 65535.&lt;BR /&gt;&amp;gt;Nice thought/touch, but largely irrelevant. OpenVMS has no choice but to round up.&lt;BR /&gt;&lt;BR /&gt;So, if I set extent size to 65535, and the cluster size was 288 blocks, presumably extending the file should theoretically mean 65664 blocks allocated?&lt;BR /&gt;&lt;BR /&gt;I had guessed that the 65535 limit was as a result of a word being used to store the value, so I couldn't see how 65664 (17 bits) would fit...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Next step is probably to SET FILE/STAT on the existing files, in an output, and use ANAL/SYS.. SHOW PROC/RMS=FSB or my RMS_STATS tool to display all counters.&lt;BR /&gt;&lt;BR /&gt;I tried the SET FILE/STAT and a MONITOR RMS /FILE=, but to be honest, it didn't reveal very much - the only non-zero counters were the CUR, AVE andMAX $GET Call Rate (Seq).&lt;BR /&gt;&lt;BR /&gt;I knocked up a quick .EXE of my own to effectively do the same as the real one, and this was the MONITOR RMS /FILE output (as a snapshot):&lt;BR /&gt;&lt;BR /&gt;Active Streams:     1                  CUR        AVE        MIN        MAX &lt;BR /&gt;&lt;BR /&gt;    $GET Call Rate    (Seq)       19375.33    4123.63       0.00   21861.00&lt;BR /&gt;                      (Key)           0.00       0.00       0.00       0.00&lt;BR /&gt;                      (RFA)           0.00       0.00       0.00       0.00&lt;BR /&gt;    $FIND Call Rate   (Seq)           0.00       0.00       0.00       0.00&lt;BR /&gt;                      (Key)           0.00       0.00       0.00       0.00&lt;BR /&gt;                      (RFA)           0.00       0.00       0.00       0.00&lt;BR /&gt;    $PUT Call Rate    (Seq)           0.00       0.00       0.00       0.00&lt;BR /&gt;                      (Key)           0.00       0.00       0.00       0.00&lt;BR /&gt;    $READ Call Rate                   0.00       0.00       0.00       0.00&lt;BR /&gt;    $WRITE Call Rate                  0.00       0.00       0.00       0.00&lt;BR /&gt;    $UPDATE Call Rate                 0.00       0.00       0.00       0.00&lt;BR /&gt;    $DELETE Call Rate                 0.00       0.00       0.00       0.00&lt;BR /&gt;    $TRUNCATE Call Rate               0.00       0.00       0.00       0.00&lt;BR /&gt;    $EXTEND Call Rate                 0.00       0.00       0.00       0.00&lt;BR /&gt;    $FLUSH Call Rate                  0.00       0.00       0.00       0.00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As for the ANA /SYS and SHOW PROC /FSB, that didn't reveal much either:&lt;BR /&gt;&lt;BR /&gt;FSB Address: 00064000&lt;BR /&gt;-----------&lt;BR /&gt;OPEN:           1.  CLOSE:        0.&lt;BR /&gt;CONNECT:        1.  DISCONN:      0.&lt;BR /&gt;REWIND:         0.  FLUSH:        0.&lt;BR /&gt;EXTEND:         0.  blocks:       0.&lt;BR /&gt;TRUNCATE:       0.  blocks:       0.&lt;BR /&gt; &lt;BR /&gt;FIND seq:       0.  key:          0.  rfa:          0.&lt;BR /&gt;GET  seq:  159199.  key:          0.  rfa:          0.  bytes:   18296029.&lt;BR /&gt;PUT  seq:       0.  key:          0.                    bytes:          0.&lt;BR /&gt;UPDATE:         0.  bytes:        0.&lt;BR /&gt;DELETE:         0.&lt;BR /&gt; &lt;BR /&gt;READ:           0.  bytes:        0.&lt;BR /&gt;WRITE:          0.  bytes:        0.&lt;BR /&gt; &lt;BR /&gt;LOCAL  CACHE attempts:  161187.  hits:  159198.  read:    1989.  write:      0.&lt;BR /&gt;GLOBAL CACHE attempts:       0.  hits:       0.  read:       0.  write:      0.&lt;BR /&gt;GLOBAL BUFFER INTERLOCKING:&lt;BR /&gt;   GBHSH Intlck Collisions:            0        GBH Intlck Collisions:         0&lt;BR /&gt;   GBHSH Held at Rundown:              0        GBH Held at Rundown:           0&lt;BR /&gt; &lt;BR /&gt;LOCKS:            Enqueue    Dequeue    Convert       Block-ast&lt;BR /&gt; Shared file:           0.         0.         0.         0. &lt;BR /&gt; Local buffer:          0.         0.         0.         0. &lt;BR /&gt; Global buffer:         0.         0.         0.         0. &lt;BR /&gt; Shared append:         0.         0.         0.         0. &lt;BR /&gt; Global section:        0.         0.         0.         0. &lt;BR /&gt; Data record:           0.         0.         0. &lt;BR /&gt; &lt;BR /&gt;XQP QIO:                1.&lt;BR /&gt; &lt;BR /&gt;BUCKET SPLIT (1) :      0.  SPLIT (N) :       0.  OUTBUFQUO:        0.&lt;BR /&gt; &lt;BR /&gt;DEV1 .. DEV5:    00000000   00000000   00000000   00000000   00000000&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;An indexed file is sorted by primary key. No ifs or buts about that.&lt;BR /&gt;Ah sorry, I *think* what I meant was that the file is indexed in order, and the records are also stored in order (rather than having the a nice sequential index still pointing to "random" disk blocks).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Size: 13956192/13956192 Owner: &lt;BR /&gt;&amp;gt;Is that the table/driver file?&lt;BR /&gt;&lt;BR /&gt;Yes, this is the primary input file, just under 14m blocks in size.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;That's not so clear to me.&lt;BR /&gt;&amp;gt;Clearly TYPE is a silly tool for this, but you know more that the XFC can guess.&lt;BR /&gt;I looked up XFC in the system management manual, and its discussion of XFC detecting sequential reads of same-size I/O requests led me to the VCC_READAHEAD SYSGEN parameter - thinking that perhaps it wasn't set, but alas it was.&lt;BR /&gt;&lt;BR /&gt;On the face of it, it appears that the executable is simply reading from the primary input file sequentially quicker than XFC can detect that that is what is happening, so although XFC is cacheing the file, it's always behind the executable (unless it gets a head start from something else, whereby the reads from executable allow XFC to keep on topping up the file into the cache).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Engage a professional in this space if it is really critical.&lt;BR /&gt;perhaps this is not the place to discuss it, but I never heard the story about how you and the Hoff come to part ways with HP - jumped, or pushed?  How has the private sector been treating you since?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;when concurrent updates are happening on other nodes in the cluster.&lt;BR /&gt;Not the case here - other jobs may happen to read the same primary input file, but certainly during my testing, there was just the one process accessing the file, and it was doing the sequential read.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ian:&lt;BR /&gt;&amp;gt;looks likely but how big is the cache on this system&lt;BR /&gt;XFC currently allocated at 2.75GB.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;and what aged version of VMS is being used?&lt;BR /&gt;You know me and many other HP customers only too well ;-)     7.3-2 on this cluster.</description>
      <pubDate>Wed, 07 Apr 2010 14:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613491#M18089</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-04-07T14:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613492#M18090</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; I'd wondered about this - assuming that the next highest contiguous block on the disk was 130752 blocks, and the RMS extend size had been set to 65376, I'm guessing that if exactly 130752 blocks were required, then:&lt;BR /&gt;a) they'd be allocated in two logical single operations&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; b) as far as BITMAP.SYS is concerned, the fact that there are two groups of 65376 blocks is irrelevant, because they are "next to each other", so would appear as a single fragment...&lt;BR /&gt;&lt;BR /&gt;They would appear as a single fragment in the MAP area for the file using them ($ DUMP/HEAD/BLOCK=COUNT=0 ). In the bitmap they would be 2 * 227 adjacent bits.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; So, if I set extent size to 65535, and the cluster size was 288 blocks, presumably extending the file should theoretically mean 65664 blocks allocated?&lt;BR /&gt;&lt;BR /&gt;Yes indeed. Because VMS has to give you 227 + 1 cluster to satisfy the extend request.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; the 65535 limit was as a result of a word being used to store the value&lt;BR /&gt;&lt;BR /&gt;Correct&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; I tried the SET FILE/STAT and a MONITOR RMS /FILE=, but to be honest, it didn't reveal very much &lt;BR /&gt;&lt;BR /&gt;IMHO the way MONI RMS presents that data is next to useless.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; As for the ANA /SYS and SHOW PROC /FSB, that didn't reveal much either:&lt;BR /&gt;&lt;BR /&gt;FSB Address: 00064000&lt;BR /&gt;:&lt;BR /&gt;GET seq: 159199. key: 0. rfa: 0. bytes: 18296029.&lt;BR /&gt;:&lt;BR /&gt;LOCAL CACHE attempts: 161187. hits: 159198. read: 1989. write: 0.&lt;BR /&gt;&lt;BR /&gt;IMHO that indicated a lot. You needed an IO about once every 80 records. So there must have been 80 records to a bucket. Those 1989 IOs would have gone through to the XFC to be resolved thread from a prior read (ahead) or from a real IO.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Ah sorry, I *think* what I meant was that the file is indexed in order, and the records are also stored in order (rather than having the a nice sequential index still pointing to "random" disk blocks).&lt;BR /&gt;&lt;BR /&gt;Got it. Yes, for records arriving in primary key order both CONVERT FAST-LOAD and Plain-old RMS will allocate in ever increasing adjacent buckets. A minor exception is that if the file needs to grow while doing so, then the new bucket is started in the fresh extend, potentially leaving the tail end of the current extend unused for up to bucket size minus 1. In this case the bucket size divides evenly into the cluster size, so that's not an issue.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; On the face of it, it appears that the executable is simply reading from the primary input file sequentially quicker than XFC can detect that that is what is happening&lt;BR /&gt;&lt;BR /&gt;I never really studied the read-ahead for XFC. RMS only does read-ahead for sequential files, not indexed, and for sequential files it 'bursts' reading a bunch, but not keeping ahead. I actually tried to implement that while in RMS engineering but there were gotcha and I had to abandon at the time.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; I never heard the story about how you and the Hoff come to part ways with HP - jumped, or pushed? &lt;BR /&gt;&lt;BR /&gt;I can only speak for myself. I received an early retirement opportunity which seemed too nice to refuse. It was a volunteered choice creating optimal (financial) conditions to try work independent for a while. That was October 2005. So far so good!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 01:55:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613492#M18090</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-08T01:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613493#M18091</link>
      <description>Hein, I'm watching this thread with some interest so a question - two actually - for you...&lt;BR /&gt;&lt;BR /&gt;In the second last paragraph of your response immediately above this one you seem to be implying that there's no read-ahead on indexed files but there is for sequential files.  Is this correct?  &lt;BR /&gt;&lt;BR /&gt;If so, is that set by the file characteristics or by the parameters in the open statement?&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 02:16:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613493#M18091</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2010-04-08T02:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613494#M18092</link>
      <description>Hello John&lt;BR /&gt;&lt;BR /&gt;John &amp;gt;&amp;gt;In the second last paragraph of your response immediately above this one you seem to be implying that there's no read-ahead on indexed files but there is for sequential files. Is this correct? &lt;BR /&gt;&lt;BR /&gt;Only from an RMS perspective, is it not reading ahead into its buffers.&lt;BR /&gt;The XFC is blisfully ignorant as to whether RMS is doign an IO from a sequential file or indexed file, so the XFC can independent from RMS trigger a read-ahead into its buffers for RMS to find the data later.&lt;BR /&gt;And behind the XFC the Controller knows even less and it can do read-aheads, and behind that the physical Disk can be doing read ahead. So the odds that you'd be waiting for a disk seek/rotation are low!&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; If so, is that set by the file characteristics or by the parameters in the open statement?&lt;BR /&gt;&lt;BR /&gt;For sequential file you have to request RAB$V_RAH in the connect, which is part of teh OPEN from an HLL perspective. It is the default for many languages. The number of buffers defines how deep the read ahead goes.&lt;BR /&gt;&lt;BR /&gt;The RMS read ahead (on sequential files) can probably disrupt the XFC read ahead recognition. I never experimented with that though.&lt;BR /&gt;&lt;BR /&gt;RMS Read ahead on indexed file would not seem too hard to implement, but it was never done nor requested. Regrettably. Again, the XFC may well decided to do the read ahead for indexed files.&lt;BR /&gt;&lt;BR /&gt;I haven't looked at the code, but it woudl nor surprise me if the XFC would find it easier to do read-ahead for IOs which nicely line up with its 16-block cache lines. But for that to happen for an indexed files, many stars need to line up! (Bucketsize 2, 4, 8,16, or 32. Clustersize a power of 2. Rms primary key data NOT in area 0, or not pre-allocated.)&lt;BR /&gt; &lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 02:38:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613494#M18092</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-08T02:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613495#M18093</link>
      <description>Records in an indexed file aren't necessarily adjacent, so there's no direct way to warm up a generic block cache given the current design of RMS.  RMS would need to do that, or to provide hints to XFC.  Neither of which, AFAIK, exists at present.&lt;BR /&gt;&lt;BR /&gt;Whether Hein's suggested leading-traversal approach might be worth the implementation effort is interesting; I'd want to measure that cache pre-populate scheme.&lt;BR /&gt;&lt;BR /&gt;It would be equally interesting to toss upgrade or a RAM disk or an SSD at the problem, and measure throughput with that.  66 megabytes isn't all that much data; that'd be close to fitting entirely into the RAM in my cellphone, and would be dwarfed by what I've got stored in the flash.   Best case, this application should be limited by the spiral transfer rate of the disk.  Or by your RAM disk or SSD bandwidth.   Arguably, RMS could just be getting in the way here if you can run from analogous in-memory data structures.  (RMS doesn't have the concept of hauling an entire file into memory as one big wad, performing the required operations, and then rolling it all out as a big wad.)&lt;BR /&gt;&lt;BR /&gt;It'd be interesting to compare RMS indexed files to an application built on Apache Cassandra, too.  But that's fodder for discussion on another day.  And no, I'm not aware of a VMS port of Cassandra.&lt;BR /&gt;&lt;BR /&gt;And after that wall of text...  &lt;BR /&gt;&lt;BR /&gt;When I go after RMS files from C, I use this code:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/595" target="_blank"&gt;http://labs.hoffmanlabs.com/node/595&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And generally not with the file I/O portions of the C RTL.  &lt;BR /&gt;&lt;BR /&gt;The C I/O has its share of considerations here; that you can even get at indexed files through a mostly-generic C API is somewhat of a remarkable implementation achievement.  But by that same token, don't expect it to be the go-fast implementation.  I might well look to haul it all into memory with a few and large I/Os.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 03:13:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613495#M18093</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2010-04-08T03:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613496#M18094</link>
      <description>&lt;!--!*#--&gt;XFC will not cache IO's to a particular file&lt;BR /&gt;in case -&lt;BR /&gt;* IO's done to the file are of size greater&lt;BR /&gt;  than VCC_MAX_IO_SIZE blocks.&lt;BR /&gt;&lt;BR /&gt;* file is present on a local RAMDISK&lt;BR /&gt;&lt;BR /&gt;* The file is accessed cluster wide and &lt;BR /&gt;  there is atleast one node in the cluster&lt;BR /&gt;  that is doing a write IO to the file.&lt;BR /&gt;&lt;BR /&gt;* file will be temporarily not cached if&lt;BR /&gt;  logical IO's are done to the file or the&lt;BR /&gt;  volume on which the file resides&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XFC ReadAhead -&lt;BR /&gt;* XFC does read ahead for a file if the&lt;BR /&gt;  SYSGEN parameter VCC$GL_READAHEAD is set&lt;BR /&gt;  to 1.&lt;BR /&gt;&lt;BR /&gt;* XFC has a read ahead factor of 3 which&lt;BR /&gt;  would mean that when read ahead is being&lt;BR /&gt;  performed on a file, 1 among 4 IO's to the&lt;BR /&gt;  file will be read ahead.&lt;BR /&gt;&lt;BR /&gt;XFC ReadHits&lt;BR /&gt;* Whether the IO is read-through or&lt;BR /&gt;  read-ahead, it is still a Read IO &lt;BR /&gt;  operation that XFC has to perform and&lt;BR /&gt;  would be used in the statistic as a IO.&lt;BR /&gt;&lt;BR /&gt;* The hit rate for the file is calculated&lt;BR /&gt;  as follows -&lt;BR /&gt;  HitRate = ReadHits/TotalIO&lt;BR /&gt;&lt;BR /&gt;  Here,&lt;BR /&gt;  ReadHits - Number of times a Read&lt;BR /&gt;             operation was satisfied from&lt;BR /&gt;             the cache&lt;BR /&gt;  Total IO - Number of Read operations&lt;BR /&gt;&lt;BR /&gt;  Both the "ReadHits" as well as "TotalIO" &lt;BR /&gt;  include read-through as well as read-ahead.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;From the information you have provided,&lt;BR /&gt;&amp;gt;&amp;gt; SHOW MEMORY /CACHE &lt;BR /&gt;&amp;gt;&amp;gt; Allocated pages           5122&lt;BR /&gt;&amp;gt;&amp;gt; Total QIOs             144399&lt;BR /&gt;&amp;gt;&amp;gt; Read hits                79682&lt;BR /&gt;&amp;gt;&amp;gt; Virtual reads          144399&lt;BR /&gt;&amp;gt;&amp;gt; Virtual writes               0&lt;BR /&gt;&amp;gt;&amp;gt; Hit rate                   55 %&lt;BR /&gt;&lt;BR /&gt;IO's to the file are going through the XFC&lt;BR /&gt;cache and there are some number of IO's&lt;BR /&gt;that are getting satisfied from the cache&lt;BR /&gt;and hence we are seeing the hit rate of 55%.&lt;BR /&gt;&lt;BR /&gt;The question is why so low Hit-rate?&lt;BR /&gt;My suspicion is that, there is some other&lt;BR /&gt;operation on that file (or volume on which&lt;BR /&gt;the file resides) that is causing the&lt;BR /&gt;contents of the file to get deposed&lt;BR /&gt;(i.e. cleared) from the cache once in a&lt;BR /&gt;while. This would cause subsequent IO's to&lt;BR /&gt;the file to get read from the disk(read&lt;BR /&gt;miss). Couple of obvious reasons for the&lt;BR /&gt;file depose would be either logical IO's&lt;BR /&gt;to the file/volume or cluster-wide write&lt;BR /&gt;operations on the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please provide the following information about the file -&lt;BR /&gt;1) XFC statistics from SDA&lt;BR /&gt;   ANAL/SYS&lt;BR /&gt;   SDA&amp;gt; XFC SHOW FILE/ID=&lt;FID_IN_HEX&gt;/STATS&lt;BR /&gt;   SDA&amp;gt; XFC SHOW MEM&lt;BR /&gt;&lt;BR /&gt;   NOTE: FID_IN_HEX is the FID of the file&lt;BR /&gt;        (dev:[dir]table.DAT;1) in Hex&lt;BR /&gt;&lt;BR /&gt;2) How big is the IO size issued by the&lt;BR /&gt;   application to the file&lt;BR /&gt;   (i.e. How big is the IO's that the&lt;BR /&gt;    application issues to the file. are&lt;BR /&gt;    they 50 blocks or 100 blocks ....)&lt;BR /&gt;&lt;BR /&gt;3) Is the file accessed cluster-wide.&lt;BR /&gt;   If yes, what type of IO (Read/write)&lt;BR /&gt;   are performed on that file cluster-wide&lt;BR /&gt;   and how frequently&lt;BR /&gt;&lt;BR /&gt;These information could provide further&lt;BR /&gt;clues as to why the hit rate is very low&lt;BR /&gt;for the file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali&lt;/FID_IN_HEX&gt;</description>
      <pubDate>Thu, 08 Apr 2010 03:23:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613496#M18094</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-08T03:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613497#M18095</link>
      <description>Good summary Murali. Thanks.&lt;BR /&gt;&lt;BR /&gt;The read-ahead 3x description sounds suspect.&lt;BR /&gt;So it sees 3 (adjacent QIOs) and then adds just one read ahead QIO? How much? Of equal size to last IO, or some large size like 8 cache lines?&lt;BR /&gt;&lt;BR /&gt;I don't think the hit rate is low.&lt;BR /&gt;I kinda expect 0%. The real file is 6+ GB, the primary key data perhaps 5+ GB. That could well be larger than the active maximum cache on an Alpha. Now if it is the same mox Mark asked about before then it is a 24-CPU Alphaserver GS1280 7/1300, running OVMS v7.3-2. So that is likely to have 48 GB or more memory, and the cache may be as high as 20 - 32 GB if not actively throttled. "&lt;BR /&gt;So normally a 6GB file would fit, and running the down stream program shortly (hours?) after the load would find the data in the cache. But other, totally unrelated activities, maybe as silly as SEAR [*...]*.log "FATAL ERROR", could flush out those, or a part of the 6GB, and cause a tremendous slowdown compared to other days/weeks.&lt;BR /&gt; &lt;BR /&gt;Time to close shop for the day!&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 03:45:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613497#M18095</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-08T03:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613498#M18096</link>
      <description>Hi Mark,&lt;BR /&gt;&lt;BR /&gt;I'm assuming that even though you're in a cluster the file is only being read in on one node at any time?  If this isn't the case then you'll never effectively cache it in my experience with XFC.  You'd need to rely on third party products like PerfectCache or on the raw IO performance of the system and the disk array that's hung off it.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 08 Apr 2010 05:37:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613498#M18096</guid>
      <dc:creator>Steve Reece_3</dc:creator>
      <dc:date>2010-04-08T05:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613499#M18097</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;From the information provided,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Total of 1 file, 13956192/13956192 blocks.&lt;BR /&gt;This is around 7GB.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; XFC currently allocated at 2.75GB.&lt;BR /&gt;XFC current size is 2.75 GB&lt;BR /&gt;&lt;BR /&gt;As Hein as pointed out,&lt;BR /&gt;The file size is bigger than the XFC cache&lt;BR /&gt;size and hence you cannot have the entire&lt;BR /&gt;file cached.&lt;BR /&gt;&lt;BR /&gt;As and when file is accessed, it would get&lt;BR /&gt;in to the cache. But as the file size is&lt;BR /&gt;larger than the XFC cache, the data for the&lt;BR /&gt;large file when read may have to throw out&lt;BR /&gt;other data for the same file already in&lt;BR /&gt;cache.&lt;BR /&gt;Example: When block 50 of the file is read&lt;BR /&gt;and there is no space in XFC cache then XFC&lt;BR /&gt;may have to throw say block 20 of the same&lt;BR /&gt;file out of cache in order to make room for&lt;BR /&gt;the block 50.&lt;BR /&gt;Subsequent IO's to block 20 would now be a&lt;BR /&gt;read miss and the data to now go to the&lt;BR /&gt;disk. This way the read hits will come down.&lt;BR /&gt;&lt;BR /&gt;Also certain activities have the potential&lt;BR /&gt;to thrash the entire XFC cache or depose the&lt;BR /&gt;data of a file/volume.&lt;BR /&gt;&lt;BR /&gt;Thrash XFC cache&lt;BR /&gt;* SEARCH/COPY or any 3rd party backup&lt;BR /&gt;  operation&lt;BR /&gt;&lt;BR /&gt;  Note: VMS backup does not thrash the XFC&lt;BR /&gt;  cache because the IO it performs skips the&lt;BR /&gt;  XFC cache. This is done by specifying the&lt;BR /&gt;  function modifier IO$M_NOVCACHE for the IO&lt;BR /&gt;  that it issues.&lt;BR /&gt;&lt;BR /&gt;Depose File/volume data from cache&lt;BR /&gt;* Logical IO to file/volume&lt;BR /&gt;* cluster-wide write operation&lt;BR /&gt;&lt;BR /&gt;What is the physical memory size of the&lt;BR /&gt;system ?&lt;BR /&gt;You can get that from DCL "$SHOW MEM/PHY"&lt;BR /&gt;&lt;BR /&gt;XFC is sized at 2.75GB. By default XFC would&lt;BR /&gt;size itself to be 1/2 of physical memory.&lt;BR /&gt;So I guess the Physical memory would be&lt;BR /&gt;around 5.5GB. Is that correct.&lt;BR /&gt;&lt;BR /&gt;As a side note, Other things to consider&lt;BR /&gt;from Read-hits point of view is caching at&lt;BR /&gt;different levels such as CRTL and RMS.&lt;BR /&gt;CRTL uses buffering and so does RMS with its&lt;BR /&gt;local buffering. When a file is accessed, it&lt;BR /&gt;its data is present in the CRTL or RMS&lt;BR /&gt;cache, then the request will be satisfied&lt;BR /&gt;from there itself. The request wonâ  t come to&lt;BR /&gt;XFC and the XFC statistics would remain the&lt;BR /&gt;same.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Thu, 08 Apr 2010 06:49:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613499#M18097</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-08T06:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613500#M18098</link>
      <description>&amp;gt;&amp;gt; I'm assuming that even though you're in&lt;BR /&gt;&amp;gt;&amp;gt; a cluster the file is only being read in&lt;BR /&gt;&amp;gt;&amp;gt; on one node at any time?&lt;BR /&gt;&amp;gt;&amp;gt; If this isn't the case then you'll never&lt;BR /&gt;&amp;gt;&amp;gt; effectively cache it in my experience&lt;BR /&gt;&amp;gt;&amp;gt; with XFC.&lt;BR /&gt;&lt;BR /&gt;Is there any particular scenario that you&lt;BR /&gt;would like to share. Because the XFC caching&lt;BR /&gt;behavior in the cluster environment should&lt;BR /&gt;be as follows&lt;BR /&gt;&lt;BR /&gt;* Multiple Reader -&lt;BR /&gt;  XFC does cache a file when they are&lt;BR /&gt;  multiple readers of the same file.&lt;BR /&gt;  The file will be cached on all nodes in&lt;BR /&gt;  the cluster.&lt;BR /&gt;&lt;BR /&gt;* One Writer, Multiple Reader-&lt;BR /&gt;  In case there is only one writer node and&lt;BR /&gt;  multiple reader nodes, then XFC does&lt;BR /&gt;  caching for the file only on the Node&lt;BR /&gt;  where the writer is present. On the nodes&lt;BR /&gt;  where readers are present the file wont&lt;BR /&gt;  the be cached.&lt;BR /&gt;&lt;BR /&gt;* Multiple Reader/Writer&lt;BR /&gt;  Where there are multiple writers to a&lt;BR /&gt;  file, XFC wont cache that file cluster&lt;BR /&gt;  wide.&lt;BR /&gt;  i.e. All the nodes will not cache the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Thu, 08 Apr 2010 07:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613500#M18098</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-08T07:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613501#M18099</link>
      <description>Hoff:&lt;BR /&gt;&amp;gt;Records in an indexed file aren't necessarily adjacent, so there's no direct way to warm up a generic block cache given the current design of RMS.&lt;BR /&gt;&lt;BR /&gt;In this particular case, the index by definition is sorted by primary key order;  the actual data records are present in the file in primary key order too.&lt;BR /&gt;&lt;BR /&gt;(A bit like what I was alluding to in my response to Hein - e.g. having records physically located in random order, but with the index in primary key order (so you quickly find it in the index, but to actually access the record, may involve a "lot" of disk activity, because the records are not logically adjacent on the disk)&lt;BR /&gt;&lt;BR /&gt;Obviously, XFC can't know whether or not records in an indexed file happen to be stored adjacent to each other in order (but is this something it can guess at, or be told about??)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;It would be equally interesting to toss upgrade or a RAM disk or an SSD&lt;BR /&gt;As is often the case, one team looks after the O/S, and layered products, whereas another team looks after the primary application.&lt;BR /&gt;&lt;BR /&gt;Getting agreement to O/S related changes is often an uphill struggle, and not something that would happen any time soon (lead time for notice of changes, getting all the approvers to approve changes, yada yada).&lt;BR /&gt;&lt;BR /&gt;Unfortunately, this is particularly the case when it can't be definitiely stated how much of a difference it would make...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;When I go after RMS files from C, I use this code:&lt;BR /&gt;The person who wrote the program originally, does now use use RMS for accessing RMS-indexed files, but this is some of his earlier code;  ideally, it will be changed, but of course, everyone is looking for a quick fix "X is wrong;  Change Y to Z and that will fix it, or at least be a workaround, whilst we can schedule recoding the program into the plan...</description>
      <pubDate>Thu, 08 Apr 2010 08:06:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613501#M18099</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-04-08T08:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613502#M18100</link>
      <description>Murali:&lt;BR /&gt;&amp;gt;XFC will not cache IO's to a particular file in case -&lt;BR /&gt;&amp;gt;* IO's done to the file are of size greater&lt;BR /&gt;&amp;gt;  than VCC_MAX_IO_SIZE blocks.&lt;BR /&gt;It's the C RTL being requested to fgets() 225 bytes or stop when a Line Feed character is encountered, whichever comes first;  what it actually requests "behind the scenes", I don't know.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;file is present on a local RAMDISK&lt;BR /&gt;No&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The file is accessed cluster wide and there is atleast one node in the cluster that is doing a write IO to the file.&lt;BR /&gt;No - a single process running on a single node in the cluster accessing it for read only.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;XFC ReadAhead -&lt;BR /&gt;&amp;gt;* XFC does read ahead for a file if the SYSGEN parameter VCC$GL_READAHEAD is set to 1.&lt;BR /&gt;A little bit of confusion here using SDA symbols and SYSGEN params, but I'm guessing you mean VCC_READAHEAD, in which case I'll just list all the VCC settings:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ MC SYSGEN SHOW VCC&lt;BR /&gt;Parameter Name           Current    Default     Min.      Max.     Unit  Dynamic&lt;BR /&gt;--------------           -------    -------    -------   -------   ----  -------&lt;BR /&gt;VCC_FLAGS                       2          2         0         -1 Bitmask    &lt;BR /&gt;VCC_MAXSIZE                  6400       6400         0    3700000 Blocks     &lt;BR /&gt;VCC_MAX_CACHE                  -1         -1         0         -1 Mbytes     D&lt;BR /&gt;VCC_MAX_IO_SIZE               127        127         0         -1 Blocks     D&lt;BR /&gt;VCC_MAX_LOCKS                  -1         -1        50         -1 Locks      D&lt;BR /&gt;VCC_READAHEAD                   1          1         0          1 Boolean    D&lt;BR /&gt;VCC_WRITEBEHIND                 1          1         0          1 Boolean    D&lt;BR /&gt;VCC_WRITE_DELAY                30         30         0         -1 Seconds    D&lt;BR /&gt;VCC_PAGESIZE                    0          0         0         -1            D&lt;BR /&gt;VCC_RSVD                        0          0         0         -1            D&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The question is why so low Hit-rate?&lt;BR /&gt;Well, actually, this is a funny thing....&lt;BR /&gt;&lt;BR /&gt;When I was running the job yesterday afternoon, after 85 mins, the hit rate was 55%.&lt;BR /&gt;&lt;BR /&gt;I ran it again this morning so that I could get the additional XFC stats from the SDA extension for you, and after 35 minutes, it was 83%.&lt;BR /&gt;&lt;BR /&gt;It looks therefore that it might quite possibly be contention for XFC resource that is causing/contributing to the problem - in heav(y|ier) system loads, the file can't be cached as quickly, either because other files need to be (part) removed from the cache to make space, or there is a delay (timeout?) in XFC servicing read requests for this file.&lt;BR /&gt;&lt;BR /&gt;I'm not actually sure how read requests get to the XFC, so I'm not sure whether or not such timeouts could occur...&lt;BR /&gt;&lt;BR /&gt;Do all read requests go to the XFC first of all, and they have to wait for the XFC to say "in cache" or "not in cache" before progressing further (if it doesn't receive a response within X amount of time, does the read "just go to disk" rather than waiting for the XFC to respond?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;My suspicion is that, there is some other operation on that file (or volume on which the file resides) that is causing the contents of the file to get deposed (i.e. cleared) from the cache once in a while. &lt;BR /&gt;&lt;BR /&gt;What I was observing, was that the the amount of the pages of the file being cached was constantly increasing, but the hit rate was remaining at 0%.&lt;BR /&gt;&lt;BR /&gt;Obviously, I couldn't really tell whether or not some old pages were being dropped out of the cache as new blocks were being added (so, if allocated pages jumped from say 1000 to 1050, it could mean 50 new pages added, or it could mean 80 new pages added and 30 old pages removed).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Please provide the following information about the file -&lt;BR /&gt;&amp;gt;1) XFC statistics from SDA&lt;BR /&gt;&lt;BR /&gt;I've attached a file which shows two sets of XFC SHOW FILE /STAT from SDA - the first is 5 minutes after starting the job (when the hit rate was still 0%), and the second is from ~66mins after the job starts (hit rate=90%)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) How big is the IO size issued by the application to the file&lt;BR /&gt;C RTL fgets() call, with a max size of 225 bytes, but like I said, I don't know what DEC C is doing under the hood...&lt;BR /&gt;&lt;BR /&gt;&amp;gt;3) Is the file accessed cluster-wide.&lt;BR /&gt;No, a single process on one node in the cluster doing sequential reads only - once the file has been created, it is not used by anything other than this job which post-processes it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein:&lt;BR /&gt;&amp;gt; I kinda expect 0%. The real file is 6+ GB, the primary key data perhaps 5+ GB. That could well be larger than the active maximum cache on an Alpha. Now if it is the same mox Mark asked about before then it is a 24-CPU Alphaserver GS1280 7/1300, running OVMS v7.3-2. So that is likely to have 48 GB or more memory, and the cache may be as high as 20 - 32 GB if not actively throttled. &lt;BR /&gt;Yup Hein, it's the same cluster.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But other, totally unrelated activities, maybe as silly as SEAR [*...]*.log "FATAL ERROR", could flush out those, or a part of the 6GB, and cause a tremendous slowdown compared to other days/weeks.&lt;BR /&gt;Well, when the job runs, the file is not in the cache, but more of the pages of the cache allocated to the file increase as the job runs.&lt;BR /&gt;&lt;BR /&gt;Like I said earlier, I can't really tell whether or not XFC is dropping the pages from the start of the file, as it adds more pages as the file is read by the job.&lt;BR /&gt;&lt;BR /&gt;On the face of it, it didn't appear to be the case, so it simply seemed that XFC was either doing read-behind in comparison to the job, or (if it is possible) the read has a timer driven AST so that if XFC hasn't responded within X time, the read goes "straight" to disk instead...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Steve:&lt;BR /&gt;&amp;gt;I'm assuming that even though you're in a cluster the file is only being read in on one node at any time?&lt;BR /&gt;One process, on one node, exclusively seuquentially reading the file, several hours after it has been created (and expunged from the cache).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Murali:&lt;BR /&gt;&amp;gt;As Hein as pointed out,  The file size is bigger than the XFC cache size and hence you cannot have the entire file cached.&lt;BR /&gt;&lt;BR /&gt;Having the entire file cached isn't really what we want or need - just a "window" on the bit of the file we are looking at - the file is being read sequentially, so once all of the records from a bucket are processed by the job, the job has no further interest or requirement in those records, and they could happily be expunged from the XFC.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;What is the physical memory size of the system ?&lt;BR /&gt;The two A/S GS1280 7/1150 systems each have 56GB, and the GS1280 7/1300 has 48GB&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;When a file is accessed, it its data is present in the CRTL or RMS cache, then the request will be satisfied from there itself. &lt;BR /&gt;Indeed;  since it seems that XFC can in fact detect that read ahead cacheing is required for this file under the right circumstances (system load?), I'm wondering whether or not it might actually be a better idea simply to have a few large RMS global buffers for the file, to ensure some kind of cacheing, rather than have the potential of failed read hits on the XFC...</description>
      <pubDate>Thu, 08 Apr 2010 08:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613502#M18100</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-04-08T08:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613503#M18101</link>
      <description>Hein has said elsewhere the only wrong answer for global buffers is zero but for a file being accessed only by one process then do global buffers behaving the same has having local buffers?&lt;BR /&gt;&lt;BR /&gt;Does the code specify a multi buffer count?&lt;BR /&gt;If not then it should pick up values set with SET RMS_DEFAULT so you can experiment.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 11:26:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613503#M18101</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-04-08T11:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613504#M18102</link>
      <description>&lt;!--!*#--&gt;Hi Mark,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; A little bit of confusion here using SDA&lt;BR /&gt;&amp;gt;&amp;gt; symbols and SYSGEN params, but I'm&lt;BR /&gt;&amp;gt;&amp;gt; guessing you mean VCC_READAHEAD,&lt;BR /&gt;Yes. I meant VCC_READAHEAD SYSGEN parameter.&lt;BR /&gt;(VCC$GL_READAHEAD was typo)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Do all read requests go to the XFC first &lt;BR /&gt;&amp;gt;&amp;gt; of all,&lt;BR /&gt;Yes in case XFC caching is enabled.&lt;BR /&gt;Application would call QIO to perform the IO&lt;BR /&gt;operation. QIO would then check if XFC is&lt;BR /&gt;enabled, if yes then it would call XFC to&lt;BR /&gt;take over the IO. In case XFC is disabled on&lt;BR /&gt;the node then QIO would not call XFC.&lt;BR /&gt;Once XFC is called, XFC would do its own set&lt;BR /&gt;of checks to determine if the IO needs to&lt;BR /&gt;skip the cache.&lt;BR /&gt;Some common scenarios in which XFC decides&lt;BR /&gt;to Skip the IO are&lt;BR /&gt;- Caching is disabled on Volume&lt;BR /&gt;  (MOUNT/NOCACHE)&lt;BR /&gt;- Caching is disabled on file&lt;BR /&gt;  (SET FILE/CACHING_ATTRIBUTE=NO_CACHING)&lt;BR /&gt;- Caching is disabled on IO&lt;BR /&gt;  (using function modifier IO$M_NOVCACHE in&lt;BR /&gt;   the QIO call)&lt;BR /&gt;- IO size is greater than VCC_MAX_IO_SIZE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; and they have to wait for the XFC to&lt;BR /&gt;&amp;gt;&amp;gt; say "in cache" or "not in cache" before&lt;BR /&gt;&amp;gt;&amp;gt; progressing further (if it doesn't&lt;BR /&gt;&amp;gt;&amp;gt; receive a response within X amount of&lt;BR /&gt;&amp;gt;&amp;gt; time, does the read "just go to disk" &lt;BR /&gt;&amp;gt;&amp;gt; rather than waiting for the XFC to &lt;BR /&gt;&amp;gt;&amp;gt; respond?&lt;BR /&gt;&lt;BR /&gt;When XFC does a read IO to a file, it first&lt;BR /&gt;checks if the data is already available in&lt;BR /&gt;the XFC Cache. If YES then it returns the&lt;BR /&gt;data immediately. If not then it performs a&lt;BR /&gt;Read IO to disk. In any case, IO would&lt;BR /&gt;always go through XFC.&lt;BR /&gt;&lt;BR /&gt;However, in case the file is shared&lt;BR /&gt;cluster-wide and some other node in the&lt;BR /&gt;cluster is doing a write operation to the&lt;BR /&gt;file then XFC won't be able to get a lock&lt;BR /&gt;on the file in the desired mode. In such a&lt;BR /&gt;case, XFC will convert the read-through to&lt;BR /&gt;read around IO. Read-around would mean, XFC&lt;BR /&gt;will make the IO skip the cache and let IO&lt;BR /&gt;happen to disk.&lt;BR /&gt;As you have mentioned that there is no other&lt;BR /&gt;node in cluster doing write IO to the file,&lt;BR /&gt;this scenario is eliminated.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; (so, if allocated pages jumped from say&lt;BR /&gt;&amp;gt;&amp;gt; 1000 to 1050, it could mean 50 new pages&lt;BR /&gt;&amp;gt;&amp;gt; added, or it could mean 80 new pages&lt;BR /&gt;&amp;gt;&amp;gt; added and 30 old pages removed).&lt;BR /&gt;Yes thatâ  s correct. Allocated pages only&lt;BR /&gt;indicates how much of the file's data is&lt;BR /&gt;currently in cache.&lt;BR /&gt;&lt;BR /&gt;Data that you have provided &lt;BR /&gt;1) File is not accessed cluster-wide&lt;BR /&gt;   From this we can rule out the scenario&lt;BR /&gt;   where the file is written once in a while&lt;BR /&gt;   from some other node of the cluster&lt;BR /&gt;&lt;BR /&gt;2) IO Size issued by the application&lt;BR /&gt;   Here also the application does not seem&lt;BR /&gt;   to be doing a IO greater than&lt;BR /&gt;   VCC_MAX_IO_SIZE&lt;BR /&gt;&lt;BR /&gt;3) XFC SDA Data&lt;BR /&gt;&amp;gt;&amp;gt; XFC File stats from ~5 mins after job &lt;BR /&gt;&amp;gt;&amp;gt; starts (hit rate=0%)&lt;BR /&gt;The data here indicates that only a few IOs&lt;BR /&gt;were satisfied from the cache, for all other IO's XFC had to fetch the requested data&lt;BR /&gt;from the disk&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; XFC File stats from ~66 mins after job&lt;BR /&gt;&amp;gt;&amp;gt; starts (hit rate=90%)&lt;BR /&gt;Here we can see quite a number of reads&lt;BR /&gt;being satisfied from the cache and hence the&lt;BR /&gt;read hit rate is higher.&lt;BR /&gt;&lt;BR /&gt;My suspicion is that, initially data is not&lt;BR /&gt;there in the XFC cache and hence hit rate&lt;BR /&gt;is very less. As data gets filled in the&lt;BR /&gt;cache, subsequent IO will find the data in&lt;BR /&gt;cache and hence the read hit rate increases. Sometime later, a logical IO might have been&lt;BR /&gt;performed on the Volume as a result of which&lt;BR /&gt;entire data on the volume gets cleared.&lt;BR /&gt;Next set of reads to the file has to now&lt;BR /&gt;fetch the data again from the disk, this&lt;BR /&gt;would now reduce the cache hit rate.&lt;BR /&gt;&lt;BR /&gt;Some questions -&lt;BR /&gt;1) Is that every time the application runs,&lt;BR /&gt;   it gets 0 hit rate in the beginning and&lt;BR /&gt;   the hit rate increases after some point&lt;BR /&gt;   of time.&lt;BR /&gt;&lt;BR /&gt;2) When does the hit rate become 0.&lt;BR /&gt;   Only when application starts accessing&lt;BR /&gt;   the data for the first time or some other&lt;BR /&gt;   time also.&lt;BR /&gt;&lt;BR /&gt;3) Are you aware of any logical IO's being&lt;BR /&gt;   performed on that volume.&lt;BR /&gt;   If the disk is mounted cluster-wide then,&lt;BR /&gt;   are any other nodes performing any&lt;BR /&gt;   Logical IO to the volume.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; everyone is looking for a quick fix "X is&lt;BR /&gt;&amp;gt;&amp;gt; wrong; Change Y to Z and that will fix&lt;BR /&gt;&amp;gt;&amp;gt; it, or at least be a workaround, whilst&lt;BR /&gt;&amp;gt;&amp;gt; we can schedule recoding the program into&lt;BR /&gt;&amp;gt;&amp;gt; the plan...&lt;BR /&gt;One suggestion for workaround would be to increase the XFC size -&lt;BR /&gt;The current Physical memory size is 56GB&lt;BR /&gt;(GS1280/1150) and 48GB(GS1280 7/1300).&lt;BR /&gt;You had mentioned that XFC is sized at&lt;BR /&gt;2.75GB. One suggestion would be to increase&lt;BR /&gt;the XFC size from the current 2.75GB&lt;BR /&gt;to 8GB. XFC is tested with memory sizes up&lt;BR /&gt;to 8GB and hence you can increase the current&lt;BR /&gt;size of XFC to 8GB for better performance.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Thu, 08 Apr 2010 11:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613504#M18102</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-08T11:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613505#M18103</link>
      <description>Ian:&lt;BR /&gt;&amp;gt;Hein has said elsewhere the only wrong answer for global buffers is zero but for a file being accessed only by one process then do global buffers behaving the same has having local buffers?&lt;BR /&gt;&lt;BR /&gt;Mea culpa.  Global buffers (as I understand them) isn't actually what I meant - I meant the buffers that SET RMS_DEFAULT /BUFFER= refers to.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Does the code specify a multi buffer count?&lt;BR /&gt;&lt;BR /&gt;Although the C RTL does allow specification of RMS options on the fopen(), it just specifies "r".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;If not then it should pick up values set with SET RMS_DEFAULT so you can experiment.&lt;BR /&gt;&lt;BR /&gt;Great minds think alike - I was just doing some back-of-a-fag-packet calculations on what to use, and will post results back here.&lt;BR /&gt;&lt;BR /&gt;The problem of course is that between tests, you have to wait for any cached part of the file to be expunged (either through normal system load, or to force it using something like "SEA [...]*.* blah") before you can test again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Murali:&lt;BR /&gt;&amp;gt;Caching is disabled on Volume&lt;BR /&gt;Not in this case (obviously, otherwise none of the file would appear in it :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Caching is disabled on file&lt;BR /&gt;Again, not in this case ("Caching attribute:  Writethrough")&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Caching is disabled on IO&lt;BR /&gt;It is an fgets() call in the C RTL, but I wouldn't have thought that it would do any disabling.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;IO size is greater than VCC_MAX_IO_SIZE&lt;BR /&gt;Unless fgets() is doing something weird, when told to read 225 bytes.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Sometime later, a logical IO might have been performed on the Volume as a result of which entire data on the volume gets cleared.&lt;BR /&gt;&amp;gt;Next set of reads to the file has to now fetch the data again from the disk, this would now reduce the cache hit rate.&lt;BR /&gt;&lt;BR /&gt;I'm not certain what you mean in this context by a logical IO - can you give some examples?&lt;BR /&gt;&lt;BR /&gt;I can understand that dismounting the volume (or a member of its shadow set) could cause this issue.&lt;BR /&gt;&lt;BR /&gt;However, could "SEA [...]*.filename_type blah" really do this?&lt;BR /&gt;&lt;BR /&gt;I'm not sure whether or not you mean this is a logical IO which would cause that volume's cache contents to be expunged...&lt;BR /&gt;...or if there is a per-volume limit in the XFC, and that depending on that limit (and the size of files be SEArched), this would cause the existing volume's cache contents to be expunged, to make way for those files that SEARCH is processing?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1) Is that every time the application runs, it gets 0 hit rate in the beginning and the hit rate increases after some point of time.&lt;BR /&gt;&lt;BR /&gt;Hmm, unfortunately, there's no statistics available from previous daily runs (unlike many of the other jobs, it actually runs at 09:00, so I don't need to log in in the middle of the night, to check).&lt;BR /&gt;However, from my manual testing, this appears to the case.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) When does the hit rate become 0. Only when application starts accessing the data for the first time or some other time also.&lt;BR /&gt;From my manual tests, it only appears to be when it starts accessing it for the first time (and where the start of the file is not in the cache), that the hit rate is 0.&lt;BR /&gt;&lt;BR /&gt;I'm not sure how the cache hit reporting code works, but the only way for the rate to drop to 0% whilst the job runs, would be due to mathematical rounding...&lt;BR /&gt;&lt;BR /&gt;(there will have been some successful hits, so successes/attempts would always yield a non-zero value unless you round it down.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Are you aware of any logical IO's being performed on that volume.&lt;BR /&gt;&amp;gt;If the disk is mounted cluster-wide then, are any other nodes performing any Logical IO to the volume.&lt;BR /&gt;&lt;BR /&gt;It depends on what precisely you mean by logical IO.&lt;BR /&gt;&lt;BR /&gt;The volume is mounted cluster-wide.&lt;BR /&gt;&lt;BR /&gt;Normally, nothing else creates files on this volume;  the only other activity may be a backup or defragger job that runs overnight, but it should be finished by 09:00 when this job runs.</description>
      <pubDate>Thu, 08 Apr 2010 13:04:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613505#M18103</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-04-08T13:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: 0% read hit rate on XFC cache for RMS indexed file being read sequentially using C RTL fgets()?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613506#M18104</link>
      <description>If there was a job before this one which accessed lots of other files on the same disk then the file in question is not going to be in the XFC.&lt;BR /&gt;&lt;BR /&gt;I guess your real aim is to reduce the elapsed time of this job that processes the RDB dumped tables. What has happened in previous runs is only useful in perhaps helping you to reduce the time for future runs.&lt;BR /&gt;&lt;BR /&gt;You can specify RMS options on the C fopen. &lt;BR /&gt;&lt;BR /&gt;If there are no RMS options specified now then you can experiment with &lt;BR /&gt;$ SET RMS/INDEX/BUFFER=3/BLOCK=&lt;BR /&gt;&lt;BR /&gt;I wonder about the physical layout of the file and could CONVERT help.&lt;BR /&gt;&lt;BR /&gt;logical I/O - different from the usual virtual I/O which address a file as a array of blocks starting at 1 - logical I/O addresses a disk as a array of blocks starting at 0. Unlikely although I wonder about the defrag job - has it finished when this job starts?</description>
      <pubDate>Thu, 08 Apr 2010 13:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/0-read-hit-rate-on-xfc-cache-for-rms-indexed-file-being-read/m-p/4613506#M18104</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-04-08T13:59:14Z</dc:date>
    </item>
  </channel>
</rss>

