Results 1 to 7 of 7
  1. #1

    Low memory after installing mysql mod php5

    Hi there,

    I have a VPS.
    I have installed "Lighttpd, php5cgi, mysql-server, mysql-client,
    libmysqlclient15-dev"

    I have optimized the MySQL Server (/etc/mysql/my.cnf).
    All these together just take 30 mb Memory.
    Lighttpd use just 12mb memory And everything is very good.

    But,
    When I install php5 mod MySQL :
    apt-get install php5-mysql
    Then the Lighttpd memory increases to 90mb !!!

    Any Solutions?
    I am using updated Debian Lenny, MySQL5, php5.

    Thanks!

  2. #2
    I guess that's the normal RAM usage, once I had set up a similar VPS configuration (but with apache) and it was using around 150MB of RAM..
    VirtualSRV.com
    |Affordable Prices|Premium Hardware
    |Instant Set Up|OpenVZ Virtualization
    Visit Us! www.virtualsrv.com

  3. #3
    Join Date
    Jul 2009
    Location
    Hamburg - Germany
    Posts
    161
    What is your Ram now? I thing if you reboot your server, you can install it on your server.

    Quote Originally Posted by ghadamyari View Post
    Hi there,

    I have a VPS.
    I have installed "Lighttpd, php5cgi, mysql-server, mysql-client,
    libmysqlclient15-dev"

    I have optimized the MySQL Server (/etc/mysql/my.cnf).
    All these together just take 30 mb Memory.
    Lighttpd use just 12mb memory And everything is very good.

    But,
    When I install php5 mod MySQL :
    apt-get install php5-mysql
    Then the Lighttpd memory increases to 90mb !!!

    Any Solutions?
    I am using updated Debian Lenny, MySQL5, php5.

    Thanks!

  4. #4
    Before Installing php5-mysql :

    Mem: 458752k total, 43940k used, 414812k 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 1980 684 588 S 0.0 0.1 0:00.61 init
    9514 root 15 0 2256 1068 872 R 0.0 0.2 0:00.00 top
    10109 www-data 18 0 7532 1176 504 S 0.0 0.3 0:00.00 lighttpd
    10110 www-data 25 0 14132 4416 3000 S 0.0 1.0 0:00.00 php5-cgi
    10113 www-data 25 0 14132 1728 312 S 0.0 0.4 0:00.00 php5-cgi
    10119 www-data 25 0 14132 4412 3000 S 0.0 1.0 0:00.00 php5-cgi
    10121 www-data 25 0 14132 1724 312 S 0.0 0.4 0:00.00 php5-cgi
    10122 www-data 25 0 14132 4420 3000 S 0.0 1.0 0:00.00 php5-cgi
    10123 www-data 25 0 14132 1732 312 S 0.0 0.4 0:00.00 php5-cgi
    10124 www-data 25 0 14132 4420 3000 S 0.0 1.0 0:00.00 php5-cgi
    10125 www-data 25 0 14132 1732 312 S 0.0 0.4 0:00.00 php5-cgi
    11972 root 25 0 2692 1304 1076 S 0.0 0.3 0:00.00 mysqld_safe
    12011 mysql 25 0 22464 5020 4208 S 0.0 1.1 0:00.02 mysqld
    12013 root 25 0 1628 528 456 S 0.0 0.1 0:00.00 logger
    18122 daemon 18 0 1764 508 408 S 0.0 0.1 0:00.00 portmap
    18247 root 15 0 1692 596 488 S 0.0 0.1 0:00.02 syslogd
    18264 root 21 0 1644 396 324 S 0.0 0.1 0:00.00 klogd

    After installing php5-mysql :

    Mem: 458752k total, 138980k used, 319772k 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 1980 684 588 S 0.0 0.1 0:00.61 init
    11833 www-data 18 0 7532 1180 504 S 0.0 0.3 0:00.00 lighttpd
    11834 www-data 25 0 38512 8080 5476 S 0.0 1.8 0:00.01 php5-cgi
    11837 www-data 25 0 38460 2912 316 S 0.0 0.6 0:00.00 php5-cgi
    11843 www-data 25 0 38512 8088 5476 S 0.0 1.8 0:00.01 php5-cgi
    11845 www-data 25 0 38460 2920 316 S 0.0 0.6 0:00.00 php5-cgi
    11846 www-data 25 0 38512 8088 5476 S 0.0 1.8 0:00.01 php5-cgi
    11848 www-data 25 0 38460 2920 316 S 0.0 0.6 0:00.00 php5-cgi
    11849 www-data 21 0 38512 8084 5476 S 0.0 1.8 0:00.01 php5-cgi
    11852 www-data 21 0 38512 2924 316 S 0.0 0.6 0:00.00 php5-cgi
    11972 root 25 0 2692 1304 1076 S 0.0 0.3 0:00.00 mysqld_safe
    12001 root 15 0 2256 1072 872 R 0.0 0.2 0:00.03 top
    12011 mysql 25 0 22464 5020 4208 S 0.0 1.1 0:00.02 mysqld
    12013 root 25 0 1628 528 456 S 0.0 0.1 0:00.00 logger
    18122 daemon 18 0 1764 508 408 S 0.0 0.1 0:00.00 portmap
    18247 root 15 0 1692 596 488 S 0.0 0.1 0:00.02 syslogd
    18264 root 21 0 1644 396 324 S 0.0 0.1 0:00.00 klogd


    It is very incredible!
    MySQL Server just take 20mb ram, its php module takes 100mb!!!!

  5. #5
    Join Date
    Jul 2009
    Location
    Hamburg - Germany
    Posts
    161
    It seems you have 300mb free ram now, i don't think php5-mysql is a problem for you

  6. #6
    Quote Originally Posted by vpsplug View Post
    I guess that's the normal RAM usage, once I had set up a similar VPS configuration (but with apache) and it was using around 150MB of RAM..
    Yes, When you install MySQL Server :
    Code:
    apt-get install mysql-server mysql-client libmysqlclient15-dev
    It takes 100mb of your RAM. but you can optimize mysql and reduce it to 20MB. ( paragasu.wordpress.com/2008/12/02/very-low-memory-mysql-5-mycnf-configuration )
    The Problem is MySQL Module for php. It uses more about 100MB Memory! and it is ...
    Code:
    apt-get install php5-mysql
    Quote Originally Posted by ServerFirma View Post
    It seems you have 300mb free ram now, i don't think php5-mysql is a problem for you
    I am testing it on my own VPS.
    I want to run a site for my customer on a VPS with 64MB RAM !

  7. #7
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Is this OpenVZ? If so, look at /proc/user_beancounters instead of top (or free).
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

Similar Threads

  1. Installing php5 on Plesk Windows VPS
    By albatroz in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 09-21-2009, 03:50 AM
  2. Installing PHP5 crashes apache.. please help
    By majglow in forum Hosting Security and Technology
    Replies: 15
    Last Post: 03-03-2006, 05:16 PM
  3. Installing PHP5 - Any issues ?
    By ahmedaf in forum Hosting Security and Technology
    Replies: 4
    Last Post: 05-30-2005, 07:49 PM
  4. Help installing PHP5 on Linux FC2 / Apache / Plesk 7.5
    By JClawson in forum Dedicated Server
    Replies: 0
    Last Post: 03-28-2005, 06:53 PM
  5. Installing php5 as CGI
    By Wido in forum Hosting Security and Technology
    Replies: 3
    Last Post: 09-24-2004, 05:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •