Link to home
Start Free TrialLog in
Avatar of mindlessacts
mindlessactsFlag for United States of America

asked on

Managing My Servers Better

Hi, I'm new to hosting servers, and though my company has been successful, I'm noticing my servers performance getting worst, and was seeking some advice. My servers are Dual Opteron 246's, and Dual Xeon 2.8/3.0, all with 2gb of memory or more. I also run Redhat Distributions on all of them

Firstly, my boxes are becoming very full, I have been spiking all the way to 90% cpu usage on some boxes, and it is causing very bad experiences for my clients. I offer game server hosting, and customers are extremely picky on the performance of the server. What would you guys suggest that I try to keep my cpu usage at to avoid any performance problems.

Also it seems like over time, my servers cpu usage gets a little higher. Should I be rebooting my server from time to time? Should I be doing any other things to keep it running good. Any other suggestions are much appreciated.

Thank You, Brad
ASKER CERTIFIED SOLUTION
Avatar of ppfoong
ppfoong

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

If your using Redhat you can set limits on people who hog the CPU you can get these limits at:

/etc/security/limits.conf

Some of the limits you can set:

- core - limits the core file size (KB)
- data - max data size (KB)
- fsize - maximum filesize (KB)
- memlock - max locked-in-memory address space (KB)
- nofile - max number of open files
 - rss - max resident set size (KB)
- stack - max stack size (KB)
- cpu - max CPU time (MIN)
- nproc - max number of processes
- as - address space limit
- maxlogins - max number of logins for this user
- maxsyslogins - max number of logins on the system
- priority - the priority to run user process with
- locks - max number of file locks the user can hold
- sigpending - max number of pending signals
- msgqueue - max memory used by POSIX message queues (bytes)
- nice - max nice priority allowed to raise to
- rtprio - max realtime priority

I would suggest setting the number of processes a user can have and also max CPU time to say 1
> 2gb of memory or more
Besides CPU usage, you might want to watch the memory usage with the following command:
free
--------------
# free
             total       used       free     shared    buffers     cached
Mem:       3947624    3931296      16328          0     105848    3210036
-/+ buffers/cache:     615412    3332212
Swap:      8385888          0    8385888
-------------------

If you see some big number in Swap:used, then you probably want to add more memory.
Besides, when the process swap between memory and the hard disk, the performance will be very bad.
So just add more memory.
Avatar of mindlessacts

ASKER

Ok, I just did the memory command, and I'm using almost 100% of the memory, but there is no way I should be using that much, I dont even have much running. Any clue why?


Regards, Brad
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ppfoong
ppfoong


For actual memory usage, see the figure shown as Active as in "cat /proc/meminfo". Linux will make use of as much physical memory as possible for buffers and caches, which is also shown there, and hence you will most probably always see 100% memory usage after some times.