Activity Stream
48,167 MEMBERS
6728 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Respected Developer

    Default Optimizing a VPS

    Ok so I have my small VPS set up. It only has 256MiB RAM so optimizing some setting and tweaking some stuff would be advised in my case.

    I installed Webmin, Virtualmin, MySQL, Litespeed (standard), php5 with eAccelerator, BIND, Postfix, etc. All the needed stuff for a webserver basically. Everything seems to be running OK but I want to tweak some stuff to keep mem usage as low as possible.

    I think MySQL could do with less RAM and that I can disable some unneeded processes. Here's what runs after a fresh boot:

    Code: 
    2414     mysql     128196 kB     /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
    2318     bind     41344 kB     /usr/sbin/named -u bind
    2281     root     27536 kB     /usr/sbin/rsyslogd -c3
    3658     root     14068 kB     /usr/share/webmin/proc/index_size.cgi
    3051     code-projects     12864 kB     lsphp5
    3052     www-data     12864 kB     lsphp5
    3104     www-data     12864 kB     lsphp5
    3646     root     9608 kB     /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    3647     root     9608 kB     /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    3648     root     9608 kB     /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    3106     root     9596 kB     /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    2964     snmp     9124 kB     /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid
    3638     lsadm     7040 kB     admin_php -c ../conf/php.ini
    3050     www-data     6192 kB     ./lshttpd
    2962     postfix     5680 kB     qmgr -l -t fifo -u
    2961     postfix     5636 kB     pickup -l -t fifo -u -c
    2952     root     5624 kB     /usr/lib/postfix/master
    3046     root     5568 kB     ./lshttpd
    2332     root     5416 kB     /usr/sbin/sshd
    2979     haldaemon     5388 kB     /usr/sbin/hald
    3026     proftpd     5256 kB     proftpd: (accepting connections)
    3085     root     3456 kB     /usr/sbin/cron
    2999     root     3388 kB     hald-addon-input: Listening on /dev/input/event2 /dev/input/event1 /dev/input/ev ...
    3008     root     3388 kB     hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
    3010     root     3388 kB     hald-addon-storage: polling /dev/hda (every 2 sec)
    2980     root     3324 kB     hald-runner
    2968     root     3272 kB     /usr/sbin/famd -T 0
    2833     root     3224 kB     /usr/lib/vmware-tools/sbin32/vmware-guestd --background /var/run/vmware-guestd.p ...
    2375     root     2832 kB     /bin/sh /usr/bin/mysqld_safe
    2302     messagebus     2620 kB     /usr/bin/dbus-daemon --system
    1108     root     2292 kB     udevd --daemon
    3007     haldaemon     2272 kB     hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
    1     root     2100 kB     init [2]
    3065     daemon     2048 kB     /usr/sbin/atd
    2081     statd     1956 kB     /sbin/rpc.statd
    2070     daemon     1892 kB     /sbin/portmap
    3049     root     1768 kB     httpd (lscgid)
    2292     root     1764 kB     /usr/sbin/acpid
    3107     root     1764 kB     /sbin/getty 38400 tty1
    3109     root     1764 kB     /sbin/getty 38400 tty2
    3111     root     1764 kB     /sbin/getty 38400 tty3
    3113     root     1764 kB     /sbin/getty 38400 tty4
    3115     root     1764 kB     /sbin/getty 38400 tty5
    3116     root     1764 kB     /sbin/getty 38400 tty6
    2416     root     1748 kB     logger -p daemon.err -t mysqld_safe -i -t mysqld
    2     root     0 kB     [kthreadd]
    3     root     0 kB     [migration/0]
    4     root     0 kB     [ksoftirqd/0]
    5     root     0 kB     [watchdog/0]
    6     root     0 kB     [events/0]
    7     root     0 kB     [khelper]
    39     root     0 kB     [kblockd/0]
    41     root     0 kB     [kacpid]
    42     root     0 kB     [kacpi_notify]
    170     root     0 kB     [kseriod]
    207     root     0 kB     [pdflush]
    208     root     0 kB     [pdflush]
    209     root     0 kB     [kswapd0]
    210     root     0 kB     [aio/0]
    757     root     0 kB     [ata/0]
    758     root     0 kB     [ata_aux]
    934     root     0 kB     [scsi_eh_0]
    1036     root     0 kB     [kjournald]
    1587     root     0 kB     [kpsmoused]
    2638     root     0 kB     [vmmemctl]
    Code: 
    Real memory: 250.39 MB total / 186.29 MB free   Swap space: 486.33 MB total / 486.33 MB free
    Any suggestions?
    Hyperz Reviewed by Hyperz on . Optimizing a VPS Ok so I have my small VPS set up. It only has 256MiB RAM so optimizing some setting and tweaking some stuff would be advised in my case. I installed Webmin, Virtualmin, MySQL, Litespeed (standard), php5 with eAccelerator, BIND, Postfix, etc. All the needed stuff for a webserver basically. Everything seems to be running OK but I want to tweak some stuff to keep mem usage as low as possible. I think MySQL could do with less RAM and that I can disable some unneeded processes. Here's what Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    donotclickme.com
    Double Post?
    "Advertising may be described as the science of arresting the human intelligence long enough to get money from it."

    Stephen Butler Leacock (1869-1944)

  4.     
    #3
    Respected Developer
    Whoops, yes please delete this one, my browser timed out

    Edit: NVM, the other one got removed, keep this one lol.

  5.     
    #4
    Banned
    Website's:
    Dev-Security.net
    If you want ill optimize your mysql for you

  6.     
    #5
    Respected Developer
    Thanks for the offer, appreciate it. But I need to get familiar with this stuff so I can do it again in the future if needed. So if you could give me tips or something on how to improve it's performance/reduce mem usage that would be awesome.

  7.     
    #6
    Banned
    Website's:
    Dev-Security.net
    No problem i sent you a pm with a script it optimizes mysql for 256 ram

  8.     
    #7
    Respected Developer
    Nice, that config reduced my total RAM usage with about 10MiB, now at 65 roughly. Thanks William .

    Anyone any idea's about the processes? Any I don't need?

  9.     
    #8
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    For reference could you post the script here?

  10.     
    #9
    Respected Developer
    Sure, this is my current MySQL config:

    Code: 
    [mysqld]
    max_connections = 400
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 1000
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 16M
    skip-innodb
     
    [mysqld_safe]
    open_files_limit = 8192
     
    [mysqldump]
    quick
    max_allowed_packet = 16M
     
    [myisamchk]
    key_buffer = 32M
    sort_buffer = 32M
    read_buffer = 16M
    write_buffer = 16M
    There's also some tips on the Virtualmin site: http://www.virtualmin.com/documentat..._memory_server

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Optimizing APC Caching
    By m1mi.dan0s in forum Webmaster Discussion
    Replies: 3
    Last Post: 3rd Oct 2012, 08:37 AM
  2. Optimizing Speed
    By Myth? in forum Wordpress
    Replies: 12
    Last Post: 16th Jan 2012, 08:40 AM
  3. Optimizing vbulletin
    By barcodenation in forum Technical Help Desk Support
    Replies: 2
    Last Post: 12th Oct 2010, 04:21 PM
  4. Optimizing MySQL and Apache - Help
    By optimushunk in forum Server Management
    Replies: 25
    Last Post: 16th May 2010, 07:24 PM
  5. Optimizing the mysqld variables
    By Lease in forum Technical and Security Tutorials
    Replies: 0
    Last Post: 14th Jan 2008, 05:30 AM

Tags for this Thread

BE SOCIAL