Re-start of RHEL server

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Re-start of RHEL server
# 8  
Old 01-21-2013
If you really want to free up some memory space, by clearing out free page caches, directory entries and inode caches, try the below:

Code:
for i in 1 2 3; do sync; sleep 1; done; sysctl -w vm.drop_caches=3

Do not expect to see huge free memory instantly though.

Reboot should not be the first troubleshooting step, especially for Un*x.

If your server's memory is being consumed almost 100% constantly, check free -m and concentrate on used column for -/+ buffers/cache:. This tells you how much memory is used by the applications apart from the cache and file system buffers.

If that amount is too high, run sar -B and concentrate on majflt/s field. This tells you how many major page faults (when kernel does not find a page in RAM and incurs reading pages from disk swap area) are occurring per second.

Compare that data with the data gathered when your system had reasonable free memory. If you see differences are high, check which processes are eating up memory, which can be found by issuing top and sorting the RES column.
# 9  
Old 01-21-2013
Quote:
Originally Posted by fpmurphy
Just because your memory usage is near 100% does not mean you have a problem with your system. Linux, by design, attempts to reserve a lot of memory for itself in advance of actually needing it. . The more crucial parameter is the amount of page swapping that is occurring. A large amount of swapping indicates that you need more physical memory.
Or it means you have a poorly coded application that has a memory leak.

Smilie
# 10  
Old 02-26-2013
If you need to find which process have the most memory, consider looking at the output from:-
Code:
ps -el | sort -n -k10 | tail

This shows the heaviest memory users. The allocated memory size is in column 10 with the PID & PPID in columns 4 & 5 respectively.

I used this to prove that a new Cobol routine in development (same server as production) was hammering the memory and the code was amended before being released to production.


You don't really need to worry about real memory being 100% full, that's quite normal even if you can't see what's seeming using it. It saves the server from performing real I-O to get frequently used files. You need to think about swap more than anything else from a performance view. Memory being swapped to/from disk is costly in processing terms.

You can list swap in use with vmstat A bit in the manual page states that under the memory section the heading swpd is "the amount of virtual memory used."

I hope that this is helpful.


Robin
Liverpool/Blackburn
UK
# 11  
Old 02-27-2013
No need to reboot for cache issue. find exact problem.
I do reboot when there is some upgrade or some specific issue that really addressed well for a reboot.
Some of my servers are running up for 2 yrs :-) Sorry I didnot patch the OS for some reasons
# 12  
Old 03-12-2013
There are two kinds of "cache" that can and will consume all your free memory - and it's a good thing.

The first is I/O buffers. This is a cache for moving data around. If you're moving 100 GB from one physical disk to another, that data is going through this I/O buffer space. It allows for more efficient multitasking. The read disk fills the buffer, and the write disk gets its data from the buffer. It's an efficient way of doing things.

The second is file cache. This is a filesystem read cache. Frequently accessed files are stored in this read cache to make accessing them quicker.

Both are tuned and managed automatically by the kernel. There is no user intervention required. There is no need to reboot to "clear" them. If you start up a new program that requires a lot of memory, the kernel will prune the I/O buffer and the file cache automatically to make room for your new program.

You can completely ignore I/O buffer and file cache for memory usage purposes. Count only the system + user space. Take your "used" total, and subtract file cache and buffer space, and the resulting number should = system + user.
# 13  
Old 03-12-2013
Quote:
Originally Posted by venikathir
if memory usage reached 100%, can we clear the cache is best option or reboot (in prod environment)
You are having the Linux Newbie Memory Freakout.

Cache memory is as good as free memory.

If your system has 99% cache, it has 99% free.

Take a deep breath and relax. Everything is fine.
# 14  
Old 03-12-2013
Memory is under VM mnagement, so it is no longer much of an issue. Sometimes excess paging is, or lack of swap space. Mostly, memory obsessions are left over from the trauma of primitive mainframe days. So many damaged souls!

Now on a 64 bit CPU you can mmap() a 100 TB file into your memory space and walk around in it like it was memory, which of course it is as you touch pages. In fact, you can seek up in an empty file 100 TB and write something to a page, and have a 1 page file. As you write the lower pages, the file allocation goes up. Hello sparse array! The rest of the space is generated null characters, if you read where you have not written.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Is it mandatory or not to stop/start Applcation server ehen Restarting Database Server?

Good afternoon I need your help please. There is a Mantenance Windos which needs to Restart de Database Server 192.x.x.97 to set up some configuration Is it mandatory or not to stop/start Applcation server that runs in 192.x.x.95 ? Is it mandatory or not to stop/start apache and Tomcat?... (3 Replies)
Discussion started by: alexcol
3 Replies

2. Red Hat

Server Hang in Linux RHEL 5.5

Dear All , One of our Oracle Database Server , which got hanged a couple of days before , so that we could not login to the Server , but it was pinging. So we tried various options and at last we did a reboot of this server. To find out the root cause of the Server Hang , when i checked the... (2 Replies)
Discussion started by: jegaraman
2 Replies

3. Red Hat

DNS Service not Start in RHEL 6.4 64 bit

Hi All, I am new to linux and i am configuring DNS server but while i restart service it shows below given error. Please help to solve this error. # /etc/init.d/named restart Stopping named: Generating /etc/rndc.key: ... (2 Replies)
Discussion started by: Chintanghanti
2 Replies

4. Red Hat

Regarding connecting to internet from RHEL 5 server

Dear All, I have a RHEL 5 server of 64 bit . I have disabled the firewalls and added the name server also in resolv.conf. I want to connect to internet inorder to link the machine with Linux Network. # I could not connect to any website from this server for ex ping google.com is not... (8 Replies)
Discussion started by: jegaraman
8 Replies

5. Red Hat

RHEL 4 Server con't Started....

Hi Friends, My Server is con't stated..it shows the below error.. Red hat exterprise Linux As Release 4(nahat) kernel 2.6.9-5.ELsmp on an i686 INIT : id "x" respawing too fast :disabled for 5 minutes... Please help help Thanks, Srinivas (1 Reply)
Discussion started by: srinivas814
1 Replies

6. Red Hat

RHEL 6.3 Errata Server?

I'm attempting to build a RHEL 6.3 yum errata server inside our company firewall with no luck. Is this something Red Hat attempts to prevent people from doing? I have done all the steps that I've been able to find to create a repository and configure it. My two repo files look like the... (2 Replies)
Discussion started by: redwing471
2 Replies

7. Red Hat

User (Profile) Specific Start Menu for RHEL 6.1 using KDE 4.3.4

I installed RHEL 6.1 with KDE 4.3.4 using LDAP on a PC and have now the problem to specifiy a user/Profile specific start menu. I have used already the kmenuedit tool and tailored for one user a specific menu, successfully. I changed as an example the konsole submenu. The kmenuedit was... (0 Replies)
Discussion started by: Gromit
0 Replies

8. Red Hat

Graphical console for RHEL 5 server

hi , i installed RHEL 5 server in one machine . i am able to login through putty . But not through Exceed . i mean to say i want a graphical user interface through exceed . some other machine i am able to log in through exceed . is there any configuration is there for that one . did i miss... (3 Replies)
Discussion started by: rateeshkumar
3 Replies

9. Solaris

To Shut down the server. Do the Maintainance and Start Up the server

Hello All I just want to know how to Shut Down the Solaris Machines( Servers ) for Maintainance and then Start Up the Machines ( Servers ) . I think I will have to Log In as root to do that . Also how do i Check if all the services running on that server before shut down are running... (6 Replies)
Discussion started by: supercops
6 Replies

10. UNIX for Advanced & Expert Users

RHEL 4 U5 - Server immediate shutdown

Dear all, My server has shutdown frequently. It is AMD64, OS is RHEL 4 U5. I've seen the system log, before the shutdown occured: Jul 29 04:28:56 localhost kernel: EDAC k8 MC0: general bus error: participating processor(local node response), time-out(no timeout) memory transaction... (2 Replies)
Discussion started by: mr_bold
2 Replies
Login or Register to Ask a Question