LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices



Reply
 
Search this Thread
Old 03-22-2013, 03:49 AM   #1
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Rep: Reputation: Disabled
Unhappy How to free cache memory in Solaris??


My system is having 28 GB of physical memory, but the free memory showing is only 880 Mb. CPU status is showing as 98% idle, but then also the system is running slow. I assume it is most probably because of filled cache memory. Need help to identify n clear cache memory in Solaris 10.
 
Old 03-22-2013, 05:49 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
What cache are you suspecting is the culprit and why ?

Please post "vmstat 5 5" and "echo ::memstat | mdb -k" output when the problem occurs.

Clearing caches is generally worsening performance, not the other way around.
 
Old 03-22-2013, 06:13 AM   #3
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi jlliagre,

Below is the output -

Code:
bash-3.00# vmstat 5 5
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr vc vc vc vc   in   sy   cs us sy id
 0 0 0 1582696 1559280 131 294 0 0 0  0  0  3 45 31 25 7753 2604 9247  1  1 98
 0 0 0 872552 1334104 247 253 0 0  0  0  0  0 48 29 25 20720 2449 24936 0 2 97
 0 0 0 858032 1320704 25 89  0  0  0  0  0  0 54 51 62 19335 1435 22928 0 2 98
 0 0 0 852992 1316184 367 221 0 0  0  0  0  0 56 47 71 20320 2259 24294 0 2 97
 0 0 0 850208 1314608 46 179 0  0  0  0  0  0 68 59 74 21218 1808 26115 0 3 97
bash-3.00# echo ::memstat | mdb -k
mdb: failed to open /dev/ksyms: No such file or directory
As I am new to Solaris, kindly explain these outputs also.

Last edited by atrivedi.abhay; 03-27-2013 at 09:49 AM.
 
Old 03-22-2013, 03:55 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Okay, so you haven't a RAM shortage so no cache memory issue either.

The issue is you are low on virtual memory.

Run "prstat -Z" from the global zone, not a non global one like you were here as the failing mdb shows.

PS: please use code tags for a better readability of the command output.

Last edited by jlliagre; 03-22-2013 at 03:57 PM.
 
Old 03-23-2013, 02:32 AM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
It seems a problem with swap space. In addition to "prstat -Z", post result of following:
Code:
~$ swap -s
Also mention what applications are running on this system?
 
Old 03-26-2013, 09:38 AM   #6
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi Jlliagre,

Below is the output you mentioned -

Code:
bash-3.00# prstat -Z
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
 29673 root       22M   11M sleep   59    0   0:58:03 0.3% bpbkar/11
 10145 oracle    954M  932M sleep   59    0   1:32:10 0.0% oracle/11
 19197 root     4120K 3688K cpu28   38    0   0:00:00 0.0% prstat/1
 19156 oracle    943M  756M sleep   59    0   0:00:00 0.0% oracle/1
 19166 oracle    943M  700M sleep   59    0   0:00:00 0.0% oracle/1
 19182 oracle    942M  699M sleep   59    0   0:00:00 0.0% oracle/1
 19186 oracle    942M  755M sleep   59    0   0:00:00 0.0% oracle/1
 24632 oracle    943M  756M sleep   59    0   0:07:49 0.0% oracle/1
  6090 oracle    942M  699M sleep   59    0   0:17:53 0.0% oracle/1
 12003 oracle   1221M 1208M sleep   59    0   0:53:25 0.0% oracle/1
 11783 oracle   1221M 1207M sleep   59    0   0:53:25 0.0% oracle/1
 19170 oracle   1198M 1191M sleep   59    0   0:00:00 0.0% oracle/1
 10378 oracle   1198M 1128M sleep   59    0   0:56:41 0.0% oracle/1
  6108 oracle    942M  699M sleep   59    0   0:19:55 0.0% oracle/1
 10404 oracle   1198M 1128M sleep   59    0   0:56:27 0.0% oracle/1
 25108 oracle    950M  763M sleep   59    0   0:06:00 0.0% oracle/1
 24648 oracle    942M  756M sleep   59    0   0:08:34 0.0% oracle/1
 10133 oracle    942M  932M sleep   59    0   0:32:03 0.0% oracle/1
  6699 oracle    946M  704M sleep   59    0   0:13:18 0.0% oracle/1
 16474 oracle   1221M 1213M sleep   59    0   0:03:26 0.0% oracle/1
 10402 oracle   1202M 1133M sleep   59    0   0:50:34 0.0% oracle/11
 10354 oracle   1199M 1189M sleep   59    0   0:22:30 0.0% oracle/1
 10987 oracle   1200M 1190M sleep   59    0   0:33:21 0.0% oracle/1
 24717 oracle    944M  757M sleep   59    0   0:01:00 0.0% oracle/31
  4797 noaccess  139M   55M sleep   59    0   1:53:29 0.0% java/18
  4420 root     2192K 1008K sleep    2   19   0:13:32 0.0% tictimed/1
  6262 oracle    942M  700M sleep   59    0   0:00:14 0.0% oracle/1
 11781 oracle   1221M 1207M sleep   59    0   0:04:01 0.0% oracle/1
  3321 root     4776K 2016K sleep   59    0   0:00:10 0.0% syslogd/17
 10147 oracle    944M  932M sleep   59    0   0:35:37 0.0% oracle/11
ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
     3      240 6918M 6667M    24%  24:02:17 0.5% catom-gmcapds51









Total: 240 processes, 2190 lwps, load averages: 0.73, 0.78, 0.80

Hi Shiva,

Below is the output you mentioned -

Code:
bash-3.00# swap -s
total: 6864736k bytes allocated + 823168k reserved = 7687904k used, 456184k available
Though I am not sure, whether these outputs will be of much use now, as the machine is working fine now, but I would really like to know the way you guys are trying to approach the probable cause.

Thanks guys for looking into my problem and helping me

Last edited by atrivedi.abhay; 03-27-2013 at 09:51 AM.
 
Old 03-26-2013, 10:00 AM   #7
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,169

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
output of swap -s: you have almost 7 GB swap space and only a half gig is available. Actually it looks like it is not too much...
prstat -Z: oracle uses your memory
you can use man prstat or man vmstat about description
 
Old 03-26-2013, 10:23 AM   #8
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
From the outputs you have given and as pan64 pointed out, almost all your swap space is consumed and lots of threads are running for oracle (probably oracle db).

It's clearly a memory issue, as you can see most of the threads are in sleep mode and waiting, and memory is mostly consumed by oracle threads.

You can run following commands and check the queue:
Code:
~$ sar -q
~$ prstat -as size
Well, I had faced the similar situation on one of my SunOne LDAP server, so I rebooted my server, which helped my server a lot to run smoothly. You can also plan for it, if possible.
 
Old 03-26-2013, 10:55 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
@atrivedi.abhay:
1: Please use code tags
2: Please run "prstat -Z" from the global zone. You only have a partial view on what the OS is using.
 
Old 03-27-2013, 05:55 AM   #10
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi Shivaa,

"prstat -as size" shows many oracle processes in sleep mode.
I will check that. Thanks

Hi Jlliagre,

"code tags" as in?
I don't have the access to global zone, so cant check that.

Last edited by atrivedi.abhay; 03-27-2013 at 09:53 AM.
 
Old 03-27-2013, 05:57 AM   #11
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
And Also, I am not sure, but is there any concept of cache in Solaris?
If yes, then how can we check it and monitor it?
 
Old 03-27-2013, 07:04 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Quote:
Originally Posted by atrivedi.abhay View Post
"code tags" as in?
Code:
Here is an example of code tags.
The lines showing code are displayed in a more readable way, and especially with a fixed width font.
Just edit (by clicking the Edit button at the bottom) your previous postings where you posted commands and their output, select them with your mouse and click on the hash (#) button. That will add the code tags I'm talking about around the selected text. Click "Preview Post" to check if the result is correct and click "Submit Reply" if it is.
Quote:
I don't have the access to global zone, so cant check that.
Then there is not much you can do to investigate or fully understand what is going on on your system.
The global zone is controlling your zone resources.
 
Old 03-27-2013, 07:08 AM   #13
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,169

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
as a minimal solution you can use the command swap and evaluate the output. You cannot handle swap directly, but you can try to kill apps. Probably you only need to add more swap space, or you need to check why do you have so many oracle processes?
 
Old 03-27-2013, 07:48 AM   #14
atrivedi.abhay
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Post

Hi Jlliagre,

Quote:
Then there is not much you can do to investigate or fully understand what is going on on your system.
The global zone is controlling your zone resources.
How do you know I am working in a local zone, and not on global zone?

@pan64:
Quote:
Probably you only need to add more swap space, or you need to check why do you have so many oracle processes?
I will check with the oracle team. Thanks

Last edited by atrivedi.abhay; 03-27-2013 at 09:56 AM.
 
Old 03-27-2013, 09:18 AM   #15
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Quote:
Originally Posted by atrivedi.abhay View Post
How do you know I am working in a local zone, and not on global zone?
I already wrote the fact /dev/ksyms was missing was a good clue.
This was confirmed by your "prstat -Z" output where only your zone named catom-gmcapds51 appears. When on the global zone, "prstat -Z" shows a summary for the global zone which is missing in your case.

Again, please edit your previous postings and add the code tags where they should be.

And by the way, when quoting other people, use "quote" tags, not "code" ones.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
commands for committed ram and cache memory on solaris nagendrar Solaris / OpenSolaris 1 05-27-2011 01:33 AM
free, buff, cache memory on Debian brgsousa Linux - Software 3 06-18-2010 12:56 PM
Like to understand the linux "free" command with respect to cache and free memory bruzzese Linux - Server 2 03-28-2010 01:52 PM
how to free the cache memory? adamruss Linux - General 5 08-25-2007 12:36 PM
increase free physical memory, decrease disk cache efm Linux - Hardware 4 03-30-2006 10:53 AM


All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration