Apparently, with Solaris 8 free memory the free memory listed is the total available. Read the two Sun-Managers comments below. THere is an important difference in S8 relative to older releases; in S8 cached file memory will show up as "free memory". In your case, you also appear to be using a considerable amount of swap which may be your normal steady state but if that grows, there's something to worry about. You should check /tmp usage, just in case. And Just so you know vmstat in solaris 8 handles its memory is slightly different then in pre solaris8. In pre solaris it the "free" column reported on file system cache as not being free like mentioned which means you'll get less and less free memory. That was normal it was ok. With solaris8 the "free" column in vmstat reports memory being used for file system cache as free memory so your numbers should be higher then in solaris 2.6 and 7. Also note unless you have a scan rate (sr column in vmstat) that is constantly high (>200 to 400) then you should not need more memory. As your system becomes memory starved your scan rate (rate at which system is looking for memory to put to disk) will increase. Because of this the scan rate is a great indecater to a memory shortage. Original Summary QUESTION: I have an E4500 Solaris 8 Server with 3 Gig of memory. The server has been up for over 6 months with no problems. The free memory is slowly being used up and we are down to 362M. I have checked all the processes being used and killed some old oracle and user processes. I know rebooting will bring the free memory back up but I want to avoid this since it is our main production server. The question is does anyone have a script to take a snapshot of the total memory being used for certain processes at a certain time? For instance, I would set a cron to take a snapshot every hour of the total memory being consumed by all oracle processes(added together).I have been working with top -osize, vmstat and a ps -e -orss to write a scripy with awk. I am hoping that I will be able to see what is slowly using up the memory. Any suggestions? Current stats look like this. Memory:3072M real, 362M free, 3896M swap in use, 1391 swap free COMMENTS: Thanks to all that responded.I recieved a few good tips on finding total memory of all users like prstat -ssize -a -n 1,15 1 1 that I recieved from Mathias K. But, I guess what I really need is a script to find the total memory of certain process that a user is running. For example: If user Joesmow has 5 oracle processes running and three parse processes, what is the total memory being consumed by oracle and the total for parse for user Joesmow? I will continue working on this script.But the overall consensus is that this is okay (See a few of the responses below): 1.)Probably there is no problem, and Solaris is using the memoryfor cacheing. There is something in the FAQ about it. 2)Free memory is _supposed_ to approach zero on a machine that's been runningfor awhile - that's how it works. Any free memory (i.e., memory not useddirectly by processes) is used for file caching. It's a feature =) The page scan rate ('sr' column in the vmstat output) is the only goodindication of an actual memory shortage - if 'sr' is consistently above 400 or so (AFAICR), it's an indication that there is an actual memory shortage and the memory subsystem is actively scanning for pages to swap out. "The Memory Go Round" is a bit dated, but still quite good:http://sunsite.nstu.nsk.su/sunworldonline/swol-05-1997/swol-05-perf.html 3)The free memory will always decrease to around 3% of total.The important thing is to avoid excessive paging.do a vmstat 1 100 and look for loads of activity in the 'sr' column. That is the scan rate - the rate at which it is reclaiming free memory. 4)high memory usage is normal. It's because processes reserve blocks of memory and so does the filesystem cache.It's not something to worry about at all, since solaris frees it up as needed.http://sunsolve.sun.com/pub-cgi/show.pl?target=content/content. 5)Instead of concentrating on the apparent usage numbers, check to see if you're actually short on memory. Does your machine swap to disk? Check the vmstat "sr" column.Don't worry. Be happy. You machine is working correctly. => Current stats look like this. => Memory:3072M real, 362M free, 3896M swap in use, 1391 swap free Looks fine to me. Thanks again!Received on Fri Dec 7 16:56:02 2001
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:37 EDT