Is there a way to free up memory manually ?


 
Thread Tools Search this Thread
Operating Systems Solaris Is there a way to free up memory manually ?
# 1  
Old 02-01-2013
Oracle Is there a way to free up memory manually ?

Hi,

I am wondering if there is a way to free up memory in Solaris manually ? the way we can do it in Linux for example :
Code:
echo `/bin/date` "************* Memory Info Before *************"
free -m
sync
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
echo `/bin/date` "************* Memory Info After  *************"
free -m

Thanks.
Regards
Terry
# 2  
Old 02-01-2013
First off you do not want to do that. It wrecks performance in spite of what you may think.

To deal with your question: Are you running zfs?

Edit - oops

http://www.solarisinternals.com/wiki...l_Tuning_Guide

You do not necessarily want to change zfs just because it appears that it is eating memory. It is supposed to look that way - have a read above.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 02-01-2013
Welcome to VM -- Once a host has been running a while, free ram pages of memory only occur in the window from when programs exit until other programs have not used up the freed pages, which were caching the heap and stack (swap backed pages). If you mmap() a file, and access the pages, they lay in ram until needed. You could exit, rerun, mmap() the same file, and read those same pages of ram. This works great for dynamic libraries, databases and all other sorts of stuff. All ram is a cache for disk.
# 4  
Old 02-02-2013
Oracle

Hi,

Thanks for your replies, appreciate it !!

I have two Solaris 11 VMs with Oracle Clusterware running on VBox, both of them with 4GiB RAM, problem is they get slower and slower and then all of a suden one of them gets crashed, it happens so frequently that I just cannot work, increasing RAM is out of question, previously I was running the same setup on Oracle Linux 5 and I was able to tweak the memory using the above script and never got a crash.

I need to find a way to tune the memory in solaris so the VMs can stay up and I can do the work.

Here are the mem stats from one of the server, this will give you an idea as to whats happening and you may be able to suggest me a way to tune them.

Just to let you know I am very new in Solaris so every bit of information will be very helpful to get this problem resolved.

echo ::memstat | mdb -k
Code:
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     202104               789   19%
ZFS File Data                9039                35    1%
Anon                       750232              2930   72%
Exec and libs               34059               133    3%
Page cache                  36889               144    4%
Free (cachelist)             6119                23    1%
Free (freelist)             10021                39    1%
Total                     1048463              4095

Please have a look at above stats and suggest me what to do.

Thank you very much for your assistance !

Regards
Terry
# 5  
Old 02-02-2013
What work are you trying to do? What applications are you running? Are they Java-based?
# 6  
Old 02-03-2013
you can also use #vmstat or #sdtprocess commands to monitor virtual memory. By this you can easily know which process you have to kill.... Smilie
This User Gave Thanks to vamshigvk475 For This Post:
# 7  
Old 02-05-2013
While in Linux the page caches can grow to 100%,
you see the page caches in Solaris are at 6%. No need for a drop_caches trick.
It looks like your Oracle DB consumes 2GB or more.
Take it down, and redo your memory measurement for comparison.
This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How the free memory threshold?

If I understand your question correctly, you are asking for an explanation of Solaris memory manager. You'd better ask Oracle that question because you are talking about Solaris kernel internals. The operating system kernel has no reason to kick a process's memory set out of real memory until... (4 Replies)
Discussion started by: hicksd8
4 Replies

2. Programming

Memory free() in C

Hi guys. I've a question, if we are using a syscall that receives a string allocated dynamicaly to a determined size, or NUL and it will allocate the apropriate size. We should free the memory or the OS will do it for us? If a function returns a pointer we should free that poiter when we are done... (7 Replies)
Discussion started by: pharaoh
7 Replies

3. UNIX for Advanced & Expert Users

Out of Memory error when free memory size is large

I was running a program and it stopped and showed "Out of Memory!". at that time, the RAM used by this process is around 4G and the free memory size of the machine is around 30G. Does anybody know what maybe the reason? this program is written with Perl. the OS of the machine is Solaris U8. And I... (1 Reply)
Discussion started by: lilili07
1 Replies

4. Red Hat

how to find out free memory?

hi, I have done the below, but am confused as to how much memory is "free" please help thanks $ free total used free shared buffers cached Mem: 132033488 48827536 83205952 0 1007696 45404632 -/+ buffers/cache: 2415208 ... (7 Replies)
Discussion started by: JamesByars
7 Replies

5. Solaris

how to get the more memory free space (see memory free column)

Hi all, Could please let me know how to get the more memory free space (not added the RAM) in local zone. -bash-3.00# vmstat 2 5 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 s1 s1 in sy cs us sy... (3 Replies)
Discussion started by: murthy76
3 Replies

6. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

7. AIX

Free Memory in aix

Hi, I want to know how to find out free physical memory in aix, (11 Replies)
Discussion started by: manoj.solaris
11 Replies

8. AIX

Free Memory

Hi, how to find free memory in aix? for installing oracle,I have used svmon but not getting proper output (1 Reply)
Discussion started by: manoj.solaris
1 Replies

9. Programming

Determining free(available) memory in MV linux

HI I'm a rookie in C programming and I'm working in Monta Vista Linux. I have to write a program that displays free memory. I have memtester(allready written by someone else) and now I have to type how much amount of memory tester will test and I want that memtester finds out himself how much of... (11 Replies)
Discussion started by: trancedeejay
11 Replies

10. Programming

How to free the memory?

For example if i have the piece of code as follows: CountryName = (char *)malloc((strlen(CountryName)+1)*sizeof(char)); memset(CountryName, 0, strlen(CountryName)+1); CountryName = SOME VALUE Now how do i free the memory after use of this code???? :confused: (3 Replies)
Discussion started by: jazz
3 Replies
Login or Register to Ask a Question