Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Datafile buffering w/ OSF1
@ 2000-05-08  4:00 Antti Jarvinen
  2000-05-08  4:00 ` Job
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Antti Jarvinen @ 2000-05-08  4:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2089 bytes --]

I'm having a slight swapping problem with digital unix 4.0 and oracle804:
bash-2.02$ vmstat 1
Virtual Memory Statistics: (pagesize = 8192)
  procs    memory         pages                          intr        cpu
  r  w  u  act  free wire fault cow zero react pin pout  in  sy  cs  us  sy  id
  2141 33   12K   62  50K 782M  25M 212M 134M  67M  15M 158  1K 747  38   5  57
  3141 32   12K   50  50K 1336   91  549 3321  252   70 387  1K  1K  26  16  58
  4134 36   12K   42  50K  982   54  377   58  225   68 354  2K  1K  40  23  37
...
and almost all processes (including ora*) are regularly swapped out and in
causing pretty ugly slowdown.

I'm thinking this might be a file system buffering problem. Our application
for most part does things periodically: there are processes that do things,
then go to sleep() for some time, wake up and begin stressing the DB again.
Every wakeup seems to cause swapping. Because this application does not use 
files, database is the storage for all necessary stuff then I'm not sure where
the file access are coming from and therefore:

 - does 8.0.4.3.0 on 4.0d open datafiles in such a mode that the filesystem
   does not cache the datafile contents again? 

As this uses datafiles in AdvFS-disks, no raw partitions are used. 

Also, I wonder if it does any good to lock SGA into memory as it seems
to be possible. It should prevent the system from swapping the SGA but
then it would increase swapping of other processes? Vmstat -P shows the
following breakdown from "wired" part of memory:
WIRED Pages Break Down:

   vm wired pages = 1199
  ubc wired pages = 4652
  meta data pages = 1958
     malloc pages = 41320
     contig pages = 279
    user ptepages = 652
  kernel ptepages = 54
    free ptepages = 4                  

.. total system memory is only 64K pages then what the fsck is this 
"malloc pages" or how do I find out what is eating it? It is clearly
not SGA as I see ora* -processes with good sized being swapped.

Thanks for your help,

-- 
Antti J�rvinen, costello@iki.fi
            "concerto for two faggots and orchestra" 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Datafile buffering w/ OSF1
  2000-05-08  4:00 Datafile buffering w/ OSF1 Antti Jarvinen
@ 2000-05-08  4:00 ` Job
  2000-05-09  4:00 ` Waco Johnny D
  2000-05-09  4:00 ` Joerg Bruehe
  2 siblings, 0 replies; 5+ messages in thread
From: Job @ 2000-05-08  4:00 UTC (permalink / raw)


Antti Jarvinen wrote:

> I'm having a slight swapping problem with digital unix 4.0 and oracle804:
> bash-2.02$ vmstat 1
> Virtual Memory Statistics: (pagesize = 8192)
>   procs    memory         pages                          intr        cpu
>   r  w  u  act  free wire fault cow zero react pin pout  in  sy  cs  us  sy  id
>   2141 33   12K   62  50K 782M  25M 212M 134M  67M  15M 158  1K 747  38   5  57
>   3141 32   12K   50  50K 1336   91  549 3321  252   70 387  1K  1K  26  16  58
>   4134 36   12K   42  50K  982   54  377   58  225   68 354  2K  1K  40  23  37
> ...
> and almost all processes (including ora*) are regularly swapped out and in
> causing pretty ugly slowdown.

How much RAM do you have?  Oracle recommends
a minimum of 128 MB.  Do you have 500 MB?
Check kernal settings (or in sysconfigtab)
you need to have shared memory max size
set to 2GB - 8MB (1.992 GB) and segments to 32.
Unless you can do this you will get nowhere.
What percentage of total RAM is the SGA, you
should aim for about 60%
What are your applications needs?  Can you put
Oracle on a separate box from the app - this
is recommended practice...
Luck,



>
>
> I'm thinking this might be a file system buffering problem. Our application
> for most part does things periodically: there are processes that do things,
> then go to sleep() for some time, wake up and begin stressing the DB again.
> Every wakeup seems to cause swapping. Because this application does not use
> files, database is the storage for all necessary stuff then I'm not sure where
> the file access are coming from and therefore:
>
>  - does 8.0.4.3.0 on 4.0d open datafiles in such a mode that the filesystem
>    does not cache the datafile contents again?
>
> As this uses datafiles in AdvFS-disks, no raw partitions are used.
>
> Also, I wonder if it does any good to lock SGA into memory as it seems
> to be possible. It should prevent the system from swapping the SGA but
> then it would increase swapping of other processes? Vmstat -P shows the
> following breakdown from "wired" part of memory:
> WIRED Pages Break Down:
>
>    vm wired pages = 1199
>   ubc wired pages = 4652
>   meta data pages = 1958
>      malloc pages = 41320
>      contig pages = 279
>     user ptepages = 652
>   kernel ptepages = 54
>     free ptepages = 4
>
> .. total system memory is only 64K pages then what the fsck is this
> "malloc pages" or how do I find out what is eating it? It is clearly
> not SGA as I see ora* -processes with good sized being swapped.
>
> Thanks for your help,
>






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Datafile buffering w/ OSF1
  2000-05-08  4:00 Datafile buffering w/ OSF1 Antti Jarvinen
  2000-05-08  4:00 ` Job
  2000-05-09  4:00 ` Waco Johnny D
@ 2000-05-09  4:00 ` Joerg Bruehe
  2000-05-10  4:00   ` Antti Jarvinen
  2 siblings, 1 reply; 5+ messages in thread
From: Joerg Bruehe @ 2000-05-09  4:00 UTC (permalink / raw)


Hi Antti ! 

Antti Jarvinen wrote:
> 
> I'm having a slight swapping problem with digital unix 4.0 and oracle804:
> [  vmstat  shows high swapping  ] 
> ...
> and almost all processes (including ora*) are regularly swapped out and in
> causing pretty ugly slowdown.
> 
> I'm thinking this might be a file system buffering problem. Our application
> for most part does things periodically: there are processes that do things,
> then go to sleep() for some time, wake up and begin stressing the DB again.
> Every wakeup seems to cause swapping. Because this application does not use
> files, database is the storage for all necessary stuff then I'm not sure where
> the file access are coming from and therefore:
> 
>  - does 8.0.4.3.0 on 4.0d open datafiles in such a mode that the filesystem
>    does not cache the datafile contents again?
> 
> As this uses datafiles in AdvFS-disks, no raw partitions are used.
> 
> [...] 

I have no special Oracle experience, but I never understood why their 
preference is to use files for their "tablespaces". 
IMHO, this will _always_ cause double cacheing (in the Oracle RAM 
structure plus in the Unix file I/O buffer pool) and so cause problems 
like you describe. 

With our Adabas D, we always recommend using raw partitions (for this 
and other reasons, one being that file I/O takes more CPU than raw 
disk I/O in the DBMS case). 

Regards, Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Datafile buffering w/ OSF1
  2000-05-08  4:00 Datafile buffering w/ OSF1 Antti Jarvinen
  2000-05-08  4:00 ` Job
@ 2000-05-09  4:00 ` Waco Johnny D
  2000-05-09  4:00 ` Joerg Bruehe
  2 siblings, 0 replies; 5+ messages in thread
From: Waco Johnny D @ 2000-05-09  4:00 UTC (permalink / raw)


Have you run sys_check yet?  If not, do so while the system is
misbehaving, and post the "virtual memory and swap" section of
the output here (or provide a pointer to it).

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Datafile buffering w/ OSF1
  2000-05-09  4:00 ` Joerg Bruehe
@ 2000-05-10  4:00   ` Antti Jarvinen
  0 siblings, 0 replies; 5+ messages in thread
From: Antti Jarvinen @ 2000-05-10  4:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

Joerg Bruehe <joerg@sql.de> writes:
> I have no special Oracle experience, but I never understood why their 
> preference is to use files for their "tablespaces". 
> IMHO, this will _always_ cause double cacheing (in the Oracle RAM 
> structure plus in the Unix file I/O buffer pool) and so cause problems 
> like you describe. 

Oracle allows raw partitions too, I'm not sure why I'm always eager to 
choose datafiles instead of partitions, propably because of the feeling
I get after having put every *file* from the disk to a tape, and put
the tape to a safe :-)

I did run sys_check that indeed did give nice propositions about what to
do, as the first thing it did, it complained about swapping so I'm happy
someone else noticed the problem too :)

So:
 I did set limit of "wired" memory to 40% as this "wired" memory
 contains AdvFS cache..among other stuff. And I did almost all the other
 parameter settings that sys_check proposed, some of them were stupid
 or at least unsuitable for my situation, where problem was big file
 caching not done in intelligent way. 

Result is what I should expect from AS1000 - not bad, does its job.
At least reponsiveness is some 1000% better :) Wired memory is not hitting
the limit as it were so propably the other parameters had some effect 
on the situation too.

If you want details about the parameters, please ask. OSF1 is 4.0d.

-- 
Antti J�rvinen, costello@iki.fi
            "concerto for two faggots and orchestra" 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-05-10  4:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-08  4:00 Datafile buffering w/ OSF1 Antti Jarvinen
2000-05-08  4:00 ` Job
2000-05-09  4:00 ` Waco Johnny D
2000-05-09  4:00 ` Joerg Bruehe
2000-05-10  4:00   ` Antti Jarvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox