Results 1 to 19 of 19
Thread: VPS using too much RAM memory
-
02-10-2012, 12:34 AM #1Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
VPS using too much RAM memory
Hello.
I have a VPS with 4 GB of dedicated RAM memory (OpenVZ) with cPanel installed on it.
However I noticed some strange thing going on. Even when there is almost no one on the websites (for example 3-4 am) very few probably, RAM memory usage is around 2.5 GB!
How is that possible if almost no one is there? I noticed also when I restart my VPS, RAM rapidly go up 2 GB and more.
Why? Is there advice so I can lower that? I'm not running anything special really, SMF forums and one portal, but there is no activity now for example and RAM memory usage is 2.5 GB...
If anyone have some advice, I would be thankful.
-
02-10-2012, 12:36 AM #2Web Host Reviewer
- Join Date
- Feb 2006
- Location
- Kepler 62f
- Posts
- 16,699
Type "top" in shell and see what's running.
|| Need a good host?
|| See my Suggested Hosts List || Editorial: EIG/Site5/Arvixe/Hostgator Alternatives
||
-
02-10-2012, 12:39 AM #3Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
top - 07:38:24 up 1 day, 4:32, 1 user, load average: 1.44, 1.04, 0.86
Tasks: 40 total, 1 running, 39 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.6%us, 4.2%sy, 0.0%ni, 89.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4097152k total, 2445060k used, 1652092k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached
And almost no one is on those websites now...
-
02-10-2012, 01:11 AM #4Web Host Reviewer
- Join Date
- Feb 2006
- Location
- Kepler 62f
- Posts
- 16,699
Okay .. but what is running?
There should be a list of processes shown.|| Need a good host?
|| See my Suggested Hosts List || Editorial: EIG/Site5/Arvixe/Hostgator Alternatives
||
-
02-10-2012, 03:29 AM #5Web Hosting Guru
- Join Date
- Sep 2010
- Posts
- 269
While top is active, press "Shift + M" to sort the results by RAM used.
-
02-10-2012, 03:51 AM #6Newbie
- Join Date
- Jul 2011
- Posts
- 26
-
02-10-2012, 04:13 AM #7WHT Addict
- Join Date
- Jul 2009
- Location
- In the Datacenter.
- Posts
- 127
SonicVPS.com - Automated VPS Provisioning
-
02-10-2012, 08:00 AM #8Disabled
- Join Date
- Feb 2012
- Location
- 9PLR.COM
- Posts
- 6
Wow.. process running to high.
Actually you use a thumail resize image scripts or something else.
-
02-10-2012, 09:30 AM #9Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
-
02-10-2012, 09:32 AM #10Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
But none of the processes use so much RAM...don't know where all is gone...and sometimes I'm getting internal server error because process cannot alocate memory, so it eats up all the RAM available.
But the strange thing is that when almost no one is on those websites, 2.5 GB RAM is used?
Thanks
-
02-10-2012, 09:34 AM #11Disabled
- Join Date
- Feb 2012
- Location
- 9PLR.COM
- Posts
- 6
Disable thumbnail image on posts. or try another theme. or try to show less images on thumbnail.
-
02-10-2012, 10:54 AM #12Web Hosting Master
- Join Date
- Oct 2008
- Posts
- 637
1. You are using OpenVZ with burstable memory. Memory usage will reported to be much higher than actual.
2. Paste your Apache config
/etc/httpd/conf/extra/httpd-mpm.conf
I'm guessing you're using prefork with "startservers" being set too high.
Tuxlite.com Complete LAMP and LNMP script for Debian and Ubuntu.
-
02-10-2012, 11:37 AM #13Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
#
# Server-Pool Management (MPM specific)
#
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
# Note that this is the default PidFile for most MPMs.
#
<IfModule !mpm_netware_module>
PidFile "logs/httpd.pid"
</IfModule>
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile "logs/accept.lock"
</IfModule>
</IfModule>
#
# Only one of the below sections will be relevant on your
# installed httpd. Use "apachectl -l" to find out the
# active mpm.
#
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# BeOS MPM
# StartThreads: how many threads do we initially spawn?
# MaxClients: max number of threads we can have (1 thread == 1 client)
# MaxRequestsPerThread: maximum number of requests each thread will process
<IfModule mpm_beos_module>
StartThreads 10
MaxClients 50
MaxRequestsPerThread 10000
</IfModule>
# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxRequestsPerChild: Maximum number of requests a thread serves. It is
# recommended that the default value of 0 be set for this
# directive on NetWare. This will allow the thread to
# continue to service requests indefinitely.
<IfModule mpm_netware_module>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxRequestsPerChild 0
MaxMemFree 100
</IfModule>
# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process,
# to handle request spikes
# MaxSpareThreads: Maximum number of idle threads per process
# MaxRequestsPerChild: Maximum number of connections per server process
<IfModule mpm_mpmt_os2_module>
StartServers 2
MinSpareThreads 5
MaxSpareThreads 10
MaxRequestsPerChild 0
</IfModule>
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>
Thanks.
-
02-10-2012, 11:40 AM #14Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
This can be the real cause I think.
Do you mean to disable thumbnail within the script I'm using? I'm using Vivvo CMS for portal solution (www.vivvo.net)
And why does thumbnail take so much RAM...
-
02-10-2012, 11:40 AM #15Web Hosting Master
- Join Date
- Jun 2011
- Location
- Internet
- Posts
- 2,985
You could always try switching to nginx. It's generally more memory efficient. Although, this likely isn't the cause of the issue.
-
02-10-2012, 11:45 AM #16Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
-
02-10-2012, 11:46 AM #17Web Hosting Master
- Join Date
- Jun 2011
- Location
- Internet
- Posts
- 2,985
Installing nginx isn't too hard. There's tutorials all over the internet for it.
-
02-10-2012, 11:51 AM #18Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
Are there any statistic how much ngnix can reduce memory and resource usage?
Thanks.
-
02-12-2012, 07:38 PM #19Web Hosting Master
- Join Date
- Nov 2005
- Posts
- 3,944
@OP:
Worker mpm tends to allocate a lot of memory with OpenVZ, so it will show a lot used even when the server is idle. This isn't necessarily a problem because when traffic starts pouring in, the RAM usage shouldn't increase too much. It will just start using what it allocated.
If your concerned, I recommend switching back to prefork. You could also consider turning off KeepAlive. KeepAlive saves CPU and load times but uses more memory.
Similar Threads
-
VPS memory optimization - used RAM never goes above 26%
By 1script in forum VPS HostingReplies: 3Last Post: 12-20-2010, 05:10 PM -
Committed memory higher than available memory on VPS
By tnedator in forum Hosting Security and TechnologyReplies: 0Last Post: 02-15-2010, 02:27 PM -
Cpanel VPS - Plenty of free memory, but 'committed' memory exceeds VPS RAM. Why?
By tnedator in forum Hosting Security and TechnologyReplies: 3Last Post: 06-12-2009, 02:56 PM -
OpenVZ with 256 ram assigned, Plesk errors and vps memory full
By Hostenlinea in forum Hosting Security and TechnologyReplies: 2Last Post: 10-21-2008, 07:43 PM -
windows VPS & memory (ram)
By dirkb in forum VPS HostingReplies: 13Last Post: 06-28-2006, 02:49 PM