Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th June 2013, 22:05
ginner159 ginner159 is offline
Member
 
Join Date: May 2013
Location: Silsden, UK
Posts: 67
Thanks: 20
Thanked 5 Times in 5 Posts
Cool Reducing ram usage after install

Hi guys and gals

I'm wondering if someone can help me. Please move If inThe wrong place.

After following the perfect server guide for apache and debian 6 squeeze with dovecot imap postfix squirrelmail. I installed it on my 3Gb ram vps. It's showing that its using 42% ram constantly!! Is this normal for ram usage? It's my first time in setting up a full control panel with emails.

Anybody got some tips to reduce it?

I've currently got 5 domains hosted on it with less than 20 hits per month each (family and friends local business sites).
I will add a list of running services when I get back home
Reply With Quote
Sponsored Links
  #2  
Old 11th June 2013, 22:13
dclardy dclardy is offline
Senior Member
 
Join Date: Sep 2009
Location: Dallas, TX
Posts: 347
Thanks: 10
Thanked 46 Times in 27 Posts
Default

Can you post the output of free -m?

I am willing to bet that a lot of your ram is cached. If so, you can read this.

http://www.linuxatemyram.com/
Reply With Quote
  #3  
Old 12th June 2013, 01:03
ginner159 ginner159 is offline
Member
 
Join Date: May 2013
Location: Silsden, UK
Posts: 67
Thanks: 20
Thanked 5 Times in 5 Posts
Question free ram results

heres the outcome of it

Code:
free -m
                  total     used     free     shared    buffers     cached
Mem:              3072       1617    1454            0            0             0
-/+ buffers/cache: 1617       1454
Swap:                0          0       0
if it is cache do you know of any other hints and tips or can point me in the direction to tune my server?

Thanks for your help
Matt

PSTREE output
Code:
# pstree
init-+-Xtightvnc
     |-amavisd-new---2*[amavisd-new]
     |-apache2-+-apache2---3*[php-cgi---php-cgi]
     |         |-5*[apache2]
     |         `-vlogger
     |-clamd---{clamd}
     |-cron
     |-dovecot-+-2*[dovecot-auth]
     |         |-3*[imap]
     |         `-6*[imap-login]
     |-fail2ban-server---6*[{fail2ban-serve}]
     |-freshclam
     |-master-+-pickup
     |        |-qmgr
     |        `-tlsmgr
     |-mysqld_safe-+-logger
     |             `-mysqld---17*[{mysqld}]
     |-named---4*[{named}]
     |-pure-ftpd-mysql
     |-saslauthd---saslauthd
     |-sshd---sshd---bash---pstree
     |-syslogd
     |-xinetd
     `-xstartup---Xsession---xmessage
This is what i get from top (first page)
Code:
top - 00:14:30 up 1 day, 14:24,  1 user,  load average: 0.33, 0.58, 0.28
Tasks:  57 total,   1 running,  56 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3145728k total,  1661620k used,  1484108k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  8364  824  692 S    0  0.0   0:00.41 init
 1043 web3      20   0  324m  11m 7820 S    0  0.4   0:00.03 php-cgi
 1178 postfix   15   0 52840 3652 2732 S    0  0.1   0:00.00 cleanup
 1181 postfix   15   0 52612 3352 2548 S    0  0.1   0:00.00 proxymap
 1182 postfix   15   0 52764 3928 2940 S    0  0.1   0:00.00 trivial-rewrite
 1183 postfix   15   0 56864 3232 2460 S    0  0.1   0:00.00 smtp
 1232 postfix   15   0 57136 4404 3336 S    0  0.1   0:00.00 smtpd
 1233 postfix   17   0 52420 2952 2288 S    0  0.1   0:00.00 pipe
 1235 postfix   16   0 39276 2440 1924 S    0  0.1   0:00.00 bounce
 1245 root      15   0 19048 1304 1024 R    0  0.0   0:00.07 top
 1537 root      18   0 54572  616  464 S    0  0.0   0:00.00 saslauthd
 1538 root      18   0 54572  308  156 S    0  0.0   0:00.00 saslauthd
 1545 root      15   0  5988  692  552 S    0  0.0   0:00.67 syslogd
 1556 amavis    15   0  207m  58m 3404 S    0  1.9   0:02.17 amavisd-new
 1564 bind      18   0  135m  13m 2024 S    0  0.4   0:00.12 named
 1580 root      18   0  420m  17m 8464 S    0  0.6   0:00.21 apache2
 1586 root      18   0 20372 3984 1932 S    0  0.1   0:00.20 vlogger
 1590 www-data  15   0  163m 3780  628 S    0  0.1   0:00.19 apache2
 1828 amavis    15   0  210m  64m 4048 S    0  2.1   0:01.53 amavisd-new
 1829 amavis    16   0  210m  65m 4020 S    0  2.1   0:01.64 amavisd-new
 1831 clamav    18   0  271m 205m 5480 S    0  6.7   1:08.63 clamd
 1928 clamav    25   0 42740 1572 1188 S    0  0.0   2:20.04 freshclam
 1948 root      15   0 20916  968  752 S    0  0.0   0:00.17 cron
 1958 root      15   0 94024 6984 2208 S    0  0.2   0:03.34 fail2ban-server
 2003 root      25   0  9148 1396 1136 S    0  0.0   0:00.01 mysqld_safe
 3154 mysql     15   0  238m  23m 6308 S    0  0.8   0:12.10 mysqld
 3156 root      23   0  3860  628  536 S    0  0.0   0:00.00 logger
 3294 postfix   15   0 39244 2384 1880 S    0  0.1   0:00.00 pickup
 3335 root      15   0 37180 2432 1908 S    0  0.1   0:00.70 master
 3344 postfix   15   0 52536 3040 2344 S    0  0.1   0:00.02 qmgr
 3357 root      15   0 34060 1656 1248 S    0  0.1   0:00.11 pure-ftpd-mysql
 3369 root      18   0 39056  920  568 S    0  0.0   0:00.00 dovecot
 3370 root      15   0 74904 3400 2604 S    0  0.1   0:00.00 dovecot-auth

Last edited by ginner159; 12th June 2013 at 01:18. Reason: add pstree output
Reply With Quote
  #4  
Old 12th June 2013, 12:18
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 40
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Code:
free -m
             total       used       free     shared    buffers     cached
Mem:           992        844        148          0         92        361
-/+ buffers/cache:        390        602
Swap:         2015          0       2015
is my output from a pretty much fresh install on CentOS 6.4 with dovecot, squirrel mail, nginx etc. (perfect server tut)

Perhaps you could detail what sort of install you did (e.g. any predefined template or extra packages, or just a minimal OS install?)

If RAM is an issue, consider switching over to nginx, that'll help a bit.

Also, combination of clamav and amavis tends to take up a few 100mb of RAM - perhaps consider an alternative to them maybe.
Reply With Quote
  #5  
Old 12th June 2013, 13:16
ginner159 ginner159 is offline
Member
 
Join Date: May 2013
Location: Silsden, UK
Posts: 67
Thanks: 20
Thanked 5 Times in 5 Posts
Cool

It was just a very minimal vps debian install it basically had apache and ssh that was all.

Then followed this: http://www.howtoforge.com/perfect-se...ispconfig-3-p6

I did a bit of tinkering and looking round. Removed dovecot-pop3d package as I make my clients connet over imaps and my ram usage has dropped by early half.
Code:
~# free -m
             total       used       free     shared    buffers     cached
Mem:          3072        901       2170          0          0          0
-/+ buffers/cache:        901       2170
Swap:            0          0          0
Is it easy just to switch? All my clients have setup Wordpress and one is using woo commerce for her store.

I noticed it hogged ram. Is there a way to limit it?

If it would be better to start from scratch which dirs should I backup to keep my current config for dovecot postfix ect because I've got them running great now

Thanks for your help its truly appreciated.
Reply With Quote
  #6  
Old 12th June 2013, 14:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Your current setup is absolutely fine and the mmeory usage is normal. Services cache data to speed up your server, please see link in post #2.

As long as you dont see swap usage or in a openvz / virtuozzo vps that the memory beancounters are reached, evrything is fine.

Your server has plenty of ram, so no need for any changes or a reinstall.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
ginner159 (13th June 2013)
  #7  
Old 12th June 2013, 14:16
dclardy dclardy is offline
Senior Member
 
Join Date: Sep 2009
Location: Dallas, TX
Posts: 347
Thanks: 10
Thanked 46 Times in 27 Posts
Default

To add more to what Till mentioned, it looks like you are on an OpenVZ node without VSwap. This means that you have no ability to cache, and the memory management in that kernel is/was pretty poor for the containers. It over inflates your memory usage, but it should not be too big of an issue for you.

Another place that you can go save memory is to turn off inno-db in mysql. If you are not going to use it, there is no need for you to have the memory used.
Reply With Quote
The Following User Says Thank You to dclardy For This Useful Post:
ginner159 (13th June 2013)
  #8  
Old 13th June 2013, 00:33
ginner159 ginner159 is offline
Member
 
Join Date: May 2013
Location: Silsden, UK
Posts: 67
Thanks: 20
Thanked 5 Times in 5 Posts
 
Default Thanks!

thanks you all!

Least i know its not something wrong with my install and i can focus on optimising my services!

All best,
Matt
Reply With Quote
Reply

Bookmarks

Tags
ispconfig3, ram, resources, vps hosting

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help installing courier n0rbertt Installation/Configuration 11 21st February 2011 14:39
update services on ubuntu kwickcut HOWTO-Related Questions 3 12th February 2011 01:45
Install Fedora12 in VMware and bypass easy install tosmith1 Installation/Configuration 0 24th December 2010 18:26
The Perfect Server - 7.10 Server (PHP5 & PHP5 Packages Install Snag) giganet HOWTO-Related Questions 8 9th December 2008 21:05
/usr/bin/make install install HTML::Parser -- NOT OK oddo Installation/Configuration 4 14th March 2006 18:32


All times are GMT +2. The time now is 16:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.