Portal Home > Knowledgebase > Articles Database > Separate MySQL and Apache Servers: Which needs more memory
Separate MySQL and Apache Servers: Which needs more memory
Posted by ncc1701, 03-16-2012, 03:30 PM |
Hello,
I am planning on setting up two separate servers. One for Apache & PHP and one for MySQL.
One server has 8GB or ram the other has 4GB. Both have the same AMD quad core processor. I also have an SSD drive that I am planning on putting with the MySQL server.
The application will be busy but not really heavy. 50-60 users on at the same time all day every day. The database is a little over 1GB and growing. Apache and PHP will be creating a lot PDF reports from data from MySQL.
My question is which server should be the MySQL server? The one with 8GB or the one with 4GB.
Thanks for any insight!
|
Posted by Mike343, 03-16-2012, 04:02 PM |
I would usually say the MySQL server as sql servers are prone to use more memory then web servers.
|
Posted by Net-Spacy, 03-16-2012, 04:18 PM |
Hello, my experience is: the MySQL-Server required more memory as a Apache-Server.
So I recommend the server with more memory for the MySQL server.
|
Posted by BiggyMike, 03-16-2012, 04:55 PM |
Personally I've seen Apache and the PHP processes use WAY more memory than MySQL if you have a lot of users or a busy site like me. The only way MySQL would use that much memory is if you are caching and that would be a lot of caching.
Personally:
MySQL 4GB with the SSD
and Web on the 8GB
|
Posted by MoonlightSupport, 03-16-2012, 09:45 PM |
It really depends on the site code, but I've seen Apache/PHP use more than MySQL. You could also easily optimize the web box if it was loading up by using something like litespeed/xcache, etc.
|
Posted by barbus, 03-17-2012, 05:17 AM |
I'd say it depends on you site popularity and your database. For instance, if you have about 1000 users simultaneously you'll need about the same number of Apache processes or at least threads. And if your database size is small (for example, up to 100M), Apache will take more memory (I assume you make your database data and/or indexes to fit in RAM.) And vice versa.
|
Add to Favourites Print this Article
Also Read