1753888 Members
7475 Online
108809 Solutions
New Discussion юеВ

Re: Memory & swap space

 
SOLVED
Go to solution
KINGSLEY_1
Regular Advisor

Memory & swap space

Hi Sirs,

We are running T24 banking application. At peak period the memory ultilization is 99% and the swap is 42%. What should i do to reduce the memory ultilization so that my database does not crashed.

Thank you very much.
32 REPLIES 32
Hakki Aydin Ucar
Honored Contributor

Re: Memory & swap space

in the first place you have to check which OS you have:

# uname -a

if you have 11iv3, check this info;

# machinfo

in generally speaking, you need to extend memory (RAM) , reduce the number of non-critical application schedule non- busy hours if available.
KINGSLEY_1
Regular Advisor

Re: Memory & swap space

Sirs,

The OS is 11.23 and phisical memory is 16GB.

Thanks.

Kingsley
James R. Ferguson
Acclaimed Contributor

Re: Memory & swap space

Hi:

You don't offer any details. Do you get ENOMEM errors? What does 'dbc_max_pct' and 'dbc_min_pct' look like?

# kmtune -q dbc_max_pct
# kmtune -q dbc_min_pct

What does swap configuration and utilization look like?

# swapinfo -tam

Do you see page-out activity (indicating swap pressure)?

# vmstat ...

Do you have a database backend with its own buffer cache (e.g. Oracle)?

Regards!

...JRF...
sarfaraj ahmad
Trusted Contributor

Re: Memory & swap space

what is the buffer cache status now in the syetem and how much memory it is taking?

also check dbc_max_pct and dbc_min_pct kernel parameter in the system.

closely monitor through glance and check is there any unnecessary process is running on that time?

also let us know process or load has been increased on the server now?

KINGSLEY_1
Regular Advisor

Re: Memory & swap space

Dear Sirs,

The following are the readings.

Thank you.

Kingsley

dbc_max_pct 50 Default Immed

dbc_min_pct 5 Default Immed



#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 2972 13412 18% 0 - 1 /dev/vg00/lvol2
reserve - 6322 -6322
memory 16363 4488 11875 27%
total 32747 13782 18965 42% - 0 -


#vmstat
procs memory page
faults cpu
r b w avm free re at pi po fr de sr in
sy cs us sy id
1 2 0 1174466 47810 124 2 10 10 1 0 84 5840
45456 1522 7 5 88



Database: oracle 10g
KINGSLEY_1
Regular Advisor

Re: Memory & swap space

Dear Sirs,

Below is the readings.

Thank you

kingsley

dbc_max_pct 50 Default Immed

dbc_min_pct 5 Default Immed



#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 2972 13412 18% 0 - 1 /dev/vg00/lvol2
reserve - 6322 -6322
memory 16363 4488 11875 27%
total 32747 13782 18965 42% - 0 -


#vmstat
procs memory page
faults cpu
r b w avm free re at pi po fr de sr in
sy cs us sy id
1 2 0 1174466 47810 124 2 10 10 1 0 84 5840
45456 1522 7 5 88



Database: oracle 10g
Patrick Wallek
Honored Contributor

Re: Memory & swap space

>>dev 16384 2972 13412 18% 0 - 1 /dev/vg00/lvol2

Since you are actually using some device swap space, I would add more RAM to your system. You are using almost 3 GB of device swap, so you need at least that much more RAM. For sufficient growth, if your system can handle it I would add 8 GB or 16 GB more RAM for a total of 24 or 32 GB.

Hein van den Heuvel
Honored Contributor

Re: Memory & swap space

>> so that my database does not crashed.

Did it? What errors? ORA-600 ?

>> At peak period the memory ultilization is 99%

It is easy to say, 'just add more memory', and 'turn down the unified buffer cache'.
And maybe that is the solution.
But please before you go there take a step back, test and verify.
What is using the memory?
- process memory?
- shared memory? ( check: ipcs -m )
- ...

That said, here would be my WAG towards what _might_ be a component of the issue.

You mention Oracle database.
That is likely significant, please tell us more.
How many instances? How much memory is each allowed to take ? (sga_max_size/sga_target)
Do they really need all of that (check SGA Target Advisory in AWR report)
Do they all need to be there are the same time?

Maybe, just maybe, it is simply over committed memory: 16 GB, 3 Oracle instances of 5 GB don't fit.
Maybe reducing those footprints to 3 GB each and all it well.

Or maybe you had PROD, DEV and QA all set the same and DEV and QA can be reduced to 1/2 the size of PROD.

Or maybe shutting down one DB during a critical window is the way to reduce the need.

One needs to understand the way the system is used to understand the options.


If the DBA is not forthcoming with help, then you can start understanding this studying the ipcs -m output.

Hope this help some,
Good luck!
Hein van den Heuvel
HvdH Performance Consulting
KINGSLEY_1
Regular Advisor

Re: Memory & swap space

Dear sirs,

This are the details you asked for:

Physical memory: 16GB

instance: 1

instance size: 126GB

sga Maxsize: 6GB

SGA Target: 4GB

#ipcs -m
IPC status from /dev/kmem as of Tue Sep 28 15:32:16 2010
T ID KEY MODE OWNER GROUP
Shared Memory:
m 0 0x411c11ec --rw-rw-rw- root root
m 1 0x4e0c0002 --rw-rw-rw- root root
m 2 0x412016a9 --rw-rw-rw- root root
m 3 0x06347849 --rw-rw-rw- root root
m 262148 0x0c6629c9 --rw-r- root root
m 32773 0x4914685c -rw-r--r-- root root
m 4718598 0x7d0a116c -rw-rw oracle oinstall