Page cache too large


 
Thread Tools Search this Thread
Operating Systems Solaris Page cache too large
# 1  
Old 03-27-2009
Page cache too large

I have a solaris10 box running a java application on it. Whenever the java app is used heavily, the amount of free memory decreases fairly rapidly. I believe I have eliminated the running applications from the culprit list. In the process I have found that the page cache is consuming about 20G of the 24G of memory on the box. I read in other posts that this is okay, since the cache is easily dumped when required by applications. But after the box reaches around 1% free memory, swap starts filling up. This makes monitoring the amount of free memory and swap pretty much useless.

Any ideas on how to identify what is getting cached, and/or how to keep it down to something sensible ?

Code:
echo "::memstat"|mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     208042              1625    7%
Anon                       200571              1566    6%
Exec and libs                2644                20    0%
Page cache                2452919             19163   79%
Free (cachelist)           111729               872    4%
Free (freelist)            138338              1080    4%

Total                     3114243             24330
Physical                  3059418             23901

Code:
last pid:  6927;  load avg:  0.44,  0.56,  0.56;       up 204+14:35:29                                                               13:55:18
74 processes: 72 sleeping, 2 on cpu
CPU states: 90.1% idle,  6.9% user,  2.9% kernel,  0.0% iowait,  0.0% swap
Memory: 24G phys mem, 1539M free mem, 24G total swap, 21G free swap

   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
  9529 root      33  59    0 1094M  586M sleep   18:06  0.02% java
 12190 root      68  44    0  505M  472M cpu/3   72.9H  8.02% java
   551 daemon     4  59    0  389M  333M sleep    5:18  0.00% nfsmapid
  2935 noaccess  27  59    0  220M   56M sleep  180:44  0.01% java
 19134 named      7  59    0   44M   18M sleep   29:57  0.01% named
   789 root      16  59    0   14M 2640K sleep    2:32  0.00% fmd
     7 root      13  59    0   12M 4056K sleep    2:50  0.00% svc.startd
 26079 root       1  59    0   11M 4976K sleep    0:00  0.00% sshd

# 2  
Old 03-27-2009
Could it be a memory leak in either the Java app or in Java itself?

How to Fix Memory Leaks in Java | Javalobby

Handling memory leaks in Java programs
# 3  
Old 03-27-2009
If the java app was leaking memory, wouldn't it's memory usage grow over time ?

Also, killing and restarting the application does not clear the memory, I have to reboot the box to free up the memory.

In the meantime, during a maintenance window I will take a heap dump and try to start debugging it. Thanks for the tips!

--
Tim
# 4  
Old 03-27-2009
The issue isn't related to your java application leaking heap memory.

What I suspect is the java application creating huge files that would stay the /tmp directory. The "Page cache" is reporting tmpfs usage, beyond other things.

What says: "df -k /tmp" ?
This User Gave Thanks to jlliagre For This Post:
# 5  
Old 03-28-2009
Wow, you sliced that with occam's razor for sure!
It was a stupid file that was being logged to in /tmp/. Which of course, was cleared out on a reboot.

Thanks so much.

--
Tim
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Loading Animation for Large Man Page Repositories

Should have done this 10 years ago, so better late than never: Just added a "loading" animation to the the man page repositories when they load, especially since some are very large and take many seconds to load. See for example: https://www.unix.com/man-page-opensolaris-repository.php ... (1 Reply)
Discussion started by: Neo
1 Replies

2. Shell Programming and Scripting

remove large portion of web page code between two tags

Hi everybody, I am trying to remove bunch of lines from web pages between two tags: one is <h1> and the other is <table it looks like <h1>Anniversary cards roses</h1> many lines here <table summary="Free anniversary greeting cards." cellspacing="8" cellpadding="8" width="70%">my goal... (5 Replies)
Discussion started by: georgi58
5 Replies

3. Shell Programming and Scripting

Print multiple copies page by page using lp command

Hi I have a pdf file that is being generated using the rwrun command in the shell script. I then have the lp command in the shell script to print the same pdf file. Suppose there are 4 pages in the pdf file , I need to print 2 copies of the first page, 2 copies of the second page , then 2... (7 Replies)
Discussion started by: megha2525
7 Replies

4. Shell Programming and Scripting

Page Break in large file

Hi, The shell script inserting the millions of rows into target flat file system and handling the line number for each line. We need a page break line after every 10,000 lines. is there any command to insert a page break line into target file. (3 Replies)
Discussion started by: koti_rama
3 Replies

5. Linux

File cache /Page cache Linux

Hi All, could any one point out any open source test-suites for "File cache" testing and as well as performance test suites for the same. Currently my system is up with Linux/ext4. Regards Manish (0 Replies)
Discussion started by: hmanish
0 Replies

6. Linux

getting info on Cache Size, Data Cache etc..

Hi all I saw in Microsoft web site www.SysInternals.com a tool called CoreInfo from able to print out on screen the size of the Data and Instruction caches of your processor, the Locigal to Physical Processor mapping, the number of the CPU sockets. etc.. Do you know if in Linux is available a... (2 Replies)
Discussion started by: manustone
2 Replies

7. AIX

amount of memory allocated to large page

We just set up a system to use large pages. I want to know if there is a command to see how much of the memory is being used for large pages. For example if we have a system with 8GB of RAm assigned and it has been set to use 4GB for large pages is there a command to show that 4GB of the *GB is... (1 Reply)
Discussion started by: daveisme
1 Replies

8. AIX

Why is my file system cache so large

Hi I have a filesystem cache which is around 20G in size and I'm a bit perplexed as to what is in it. I'm running Sybase on the machine with the db on raw volumes and a tempdb on a ramdisk. My understanding is that raw volumes are not cached and I assumed that the ramdisk is not either. Am... (1 Reply)
Discussion started by: mgibbons
1 Replies

9. UNIX for Advanced & Expert Users

UBC cache vs. Metadata cache

hi, What is the difference between UBC cache and Metadata cache ? where can i find UBC cache Hits and Metadata cache Hits in hp-ux? Advanced thanx for the help. (2 Replies)
Discussion started by: sushaga
2 Replies
Login or Register to Ask a Question