Operating System - OpenVMS
1748058 Members
5565 Online
108758 Solutions
New Discussion юеВ

Re: XFC cachinh of no_caching file ?

 
SOLVED
Go to solution
DICTU OpenVMS
Frequent Advisor

XFC cachinh of no_caching file ?

For backup pupose we nightly make an entire export of our Oracle 8i database. The export doesn't need te be read again (until...). So we've set the directory attributes of the export dir to no_caching. But when I look at the xfc stat's it seems that the file is still in the cache. VMS 7.3-1 with recent patches. Output (somewhat edited) :

$ sh mem /cache=(vol=disk$expdisk)
System Memory Resources on 9-DEC-2003 09:04:13.24

Extended File Cache Volume Statistics:

_$1$DGA714: (DISK$EXPDISK), Caching mode is VIOC Compatible
Open files 0
Closed files 1
Files ever opened 200
Files ever deposed 199
Allocated pages 158225
Locks acquired 0
Total QIOs 102128
Read hits 0
Virtual reads 0
Virtual writes 102128
Hit rate 0 %
Read aheads 0
Read throughs 0
Write throughs 102128
Read arounds 0
Write arounds 0
Ave Disk I/O Resp Time incl cache hits (microseconds) 658

Total of 1 volume in cache


$ sh mem /cache=(file=disk$expdisk:*.*) /ful
System Memory Resources on 9-DEC-2003 09:04:19.41

Extended File Cache File Statistics:

_$1$DGA714:[EXPORTS]ENTIRE_REP.EXP;1 (closed)
Caching is enabled, active caching mode is No Caching
Allocated pages 158225
Total QIOs 102128
Read hits 0
Virtual reads 0
Virtual writes 102128
Hit rate 0 %
Read aheads 0
Read throughs 0
Write throughs 102128
Read arounds 0
Write arounds 0

Total of 1 file for this volume


$ dir $1$DGA714:[EXPORTS]ENTIRE_REP.EXP /cach

Directory $1$DGA714:[EXPORTS]

ENTIRE_REP.EXP;1 No_caching

Total of 1 file.
14 REPLIES 14
Willem Grooters
Honored Contributor

Re: XFC cachinh of no_caching file ?

RMS will use caching for performance sake (and because it's technically required: Disk IS slow!).
What you see here is in fact just IO statistics, I don't think there will be any data left. That means that read will turn toi disk (and place data in this buffer and update statistics).
XFC does quite a lot of things, apart from caching (meaning "shared access" where data is kept available).
Willem Grooters
OpenVMS Developer & System Manager
DICTU OpenVMS
Frequent Advisor

Re: XFC cachinh of no_caching file ?

But if the show output is just IO stat's, why do I get about 1 GB of memory back from the XFC cache if I dismount/mount the disk ?
Willem Grooters
Honored Contributor

Re: XFC cachinh of no_caching file ?

RMS will use XFC as buffer - for read/write operations, directory maintenance etc. So there WILL be (virtual) memory allocated even if you specify "no_cache". As stated before, it means "Any read should come from disk" so XFC is used as buffer only. Not as a cache in the current sense (meaning: shared data, it's in memory so don't go to disk).

(OFF TOPIC: he collega! ;-)
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: XFC cachinh of no_caching file ?

(Als jullie twee morgen vroeg allebei om 10:00 naar de koffie machine lopen, dan kun je het mooi in persoon doorpraten :-)
Ik weet het ook niet,
Groetjes,
Hein.

Mark Hopkins_4
Occasional Advisor

Re: XFC cachinh of no_caching file ?

XFC does not have any mechanism to force a
particular file out of memory. When you set the file to no_caching, this will cause future I/Os to this file to bypass the cache. Memory allocated to the file will
be recycled using the normal LRU mechanism
in the cache.

When a volume is dismounted, then all the XFC memory for files on that volume is freed - so you'll see the memory show up
immediately. For the next version of XFC,
the depose code (i.e. the code that throws
stuff out of cache) was speed up by a large
factor (up to 20x for some systems). One side effect of this change will be that the depose due to the dismount will not appear
to have released the memory. However, it
is available and is the first used when
memory is required.

Mark Hopkins
DICTU OpenVMS
Frequent Advisor

Re: XFC cachinh of no_caching file ?

Mark,

Thank you. But I still don't understand it right. The export file is deleted the day after, and then a new export is created. I set the directory to no_caching, so the newly created file is also set to no_caching. So in my humble opinion the newly created file shouldn't go into the cache (allocated pages should be 0). I want the file to be write_around, not write_through. The file is just for emergancy use...
DICTU OpenVMS
Frequent Advisor

Re: XFC cachinh of no_caching file ?

OFF TOPIC : Hein : Helaas zitten wij niet bij dezelfde opdrachtgever... ;-)
Willem Grooters
Honored Contributor

Re: XFC cachinh of no_caching file ?

Setting the directory itself to NO_CAHING could not be sufficient. You need to set the files under it to NO_CAHING as well. I found this in the system manager's manual for 7.3-2:

This example sets the caching attribute to no caching for all the files in and under the directory [SMITH.BORING].

The first SET FILE command sets the attribute for the directory to make sure that all files and subdirectories subsequently created in it inherit the attribute. The second SET FILE command sets the attribute for all existing files and directories in and under the directory.
$ SET FILE DISK$USERS:[SMITH]BORING.DIR;1 /CACHING_ATTRIBUTE=NO_CACHING
$ SET FILE DISK$USERS:[SMITH.BORING...]*.*;* /CACHING_ATTRIBUTE=NO_CACHING

I think this holds for older versions as well.
Just check the attribute is set:

This example uses the DIRECTORY command's /CACHING_ATTRIBUTE qualifier to show the caching attribute of MYFILE.TXT:
$ DIRECTORY MYFILE.TXT /CACHING_ATTRIBUTE

Directory DISK$USERS:[SMITH]
MYFILE.TXT;1 Write-through
Total of 1 file.

(well, this on eis write_through, not no_cache but you'll understand the meaning).

If you make your exports to a separate disk, consider mounting the disk /NOCACHE:

This example mounts a database volume labeled ORACLE_VOL1 with caching disabled:

$ MOUNT DUA100: ORACLE_VOL1 /NOCACHE /SYSTEM

Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: XFC cachinh of no_caching file ?

(OFF TOPIC: hein: kweetnie eens wie kweetnie is. Erg he? Maar hij weet me vast wel te vinden ;))
Willem Grooters
OpenVMS Developer & System Manager