LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   How to free cache memory in Solaris?? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-free-cache-memory-in-solaris-4175455099/)

atrivedi.abhay 03-22-2013 02:49 AM

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.

jlliagre 03-22-2013 04:49 AM

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.

atrivedi.abhay 03-22-2013 05:13 AM

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.

jlliagre 03-22-2013 02:55 PM

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.

shivaa 03-23-2013 01:32 AM

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?

atrivedi.abhay 03-26-2013 08:38 AM

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 :)

pan64 03-26-2013 09:00 AM

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

shivaa 03-26-2013 09:23 AM

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.

jlliagre 03-26-2013 09:55 AM

@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.

atrivedi.abhay 03-27-2013 04:55 AM

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.

atrivedi.abhay 03-27-2013 04:57 AM

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?

jlliagre 03-27-2013 06:04 AM

Quote:

Originally Posted by atrivedi.abhay (Post 4919761)
"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.

pan64 03-27-2013 06:08 AM

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?

atrivedi.abhay 03-27-2013 06:48 AM

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 :)

jlliagre 03-27-2013 08:18 AM

Quote:

Originally Posted by atrivedi.abhay (Post 4919797)
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.


All times are GMT -5. The time now is 02:15 AM.