Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Possible to turn off file system cache?

Re: Possible to turn off file system cache?

From: Casper H.S. Dik - Network Security Engineer <Casper.Dik_at_Holland.Sun.COM>
Date: 1997/04/20
Message-ID: <casper.861541567@uk-usenet.uk.sun.com>#1/1

Dan Bikle <dbikle_at_rahul.net> writes:

>I'm working on a Solaris 2.5.1 machine which appears to be
>memory constrained.
 

>It only has 2134 pages of freemem.

That is normal; freemem will always drop to 2M and the rest is used as a cache; the system feels that freeing cached memory just to add to the freelist is a waste. These pages are not marked dirty, so they can be reclaimed just as easily as memory on the freelist.

>"When ps looks at a particular oracle process, is the shared memory
>which the process is attached to count towards the memory size of
>that process?"

I think so, yes.

>This is a huge memory size for a process. I can only make sense
>of it if I conclude that ps is adding shared memory to private
>memory in the display but that the process is not really 223584 kb.
>If I want to find the true size of the process I need to subtract
>216062460 bytes from 223584 kb to come up with 12586 kb. This is
>still a large size for a process but we are talking about an Oracle
>process (Oracle software has a rep for being a resource hog).

12M isn't overly much for a process; the X server and netscape typically use (much) more.

Why shouldn't ps count shared memory? It has typically no way of knowning whetehr shared memory belongs to just the one process or many more; similary, shared library and executable size is also counted toward each process size.

>This second scenario is so scary, in fact, that I'll ignore it and
>concentrate on scenario # 1.

Correct.

>When I run it I get the following number:
 

>1439960
 

>So, ps reports that the total memory consumption by processes on this
>machine is 1,439,960 kb (which is outrageous).

Indeed, you counted a lot of memory everal times. (shared libraries, shared binaries, etc)

>So, it appears that at this moment, all of the process on this
>machine consume only 173,970 kb which is about 17 % of the
>1gb of ram.

+ one shared memory segment; you should only substract that 5, not 6 times.

>Shared memory consumes 20% of the ram
>Processes consume 17% of the ram
 

>WHERE is the other 63% of the ram?

It's all the past I/O youv'e done that's still in the cache. It really doesn't hurt there; it can be reclaimed quickly. Might be a large part of your database too, if you use a diskfile database rather than a diskparittion database.

>Could it be that Solaris is devoting 63% of the ram to cache
>files which have been opened by oracle?

Very possible.

>On this machine I happen to know that all of the oracle data files
>are large ufs files rather than raw devices.

Then that's your answer.

>Does Solaris have a shell command or gui tool which will tell me
>how much ram is devoted to caching the file system?

Nope. But the RAM is not *devoted* to caching files. If you need it for somethign else, it will be reclaimed. The fact that large parts of the database are still in RAM only means that the database will run that much quicker.

>Does Solaris have a shell command or gui tool which I can use
>to tell Solaris to not cache certain files?

No, not at this time. Solaris 2.6 will haev direct I/O whcih youcan use to uncache certain files.

However, that may adversely impact tyour database performance.

The SunWorld Online magazine has a Column by Adrian Cockcroft which discusses many of these performance issues in detail; see www.sun.com for a pointer to SunWorld Online; his column has a reference to all his past issues.

Casper

--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Received on Sun Apr 20 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US