Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Webserver/MySQL memory usage

Hi,


I have a Mac Mini (baseline, 2012) with Server.app running Apache and MySQL.


I am yet to run into performance issues, but the memory usage graph in Server.app seemed to be a bit concerning to me.


User uploaded file


User uploaded file


While there are still 1.3GB of inactive memory, there seemed to be a hard limit in terms of how much is being consumed.


I have no idea whether it's MySQL (seemed to be the one with the largest footprint), or Apache (which had loads of small memory processes).


Any ways to find out and how to allow them to use more memory? (if that's necessary?)

Mac mini, OS X Mountain Lion (10.8.3)

Posted on May 29, 2013 11:48 AM

Reply
Question marked as Best reply

Posted on May 30, 2013 4:25 AM

OS X Server can use a lot of memory for caching at the file system level and this doesn't register on the diagram you see above. Programs like MySQL need to keep the disk databases updated and they don't tend to grab lots of memory for caching except while you are making a lot of changes to their data. Then you'll see their allocation leap up until they've had time to write changes back to disk.


The diagram you see above looks fine to me, and suggests you have plenty of memory free in case someone suddenly does lots of web activity, prints a large print job or makes lots of changes to a MySQL database. I don't think you have any cause for alarm.


If you're actually getting slow response from your server, of course please post again with which service(s) are running slowly.

3 replies
Question marked as Best reply

May 30, 2013 4:25 AM in response to burnduck

OS X Server can use a lot of memory for caching at the file system level and this doesn't register on the diagram you see above. Programs like MySQL need to keep the disk databases updated and they don't tend to grab lots of memory for caching except while you are making a lot of changes to their data. Then you'll see their allocation leap up until they've had time to write changes back to disk.


The diagram you see above looks fine to me, and suggests you have plenty of memory free in case someone suddenly does lots of web activity, prints a large print job or makes lots of changes to a MySQL database. I don't think you have any cause for alarm.


If you're actually getting slow response from your server, of course please post again with which service(s) are running slowly.

May 30, 2013 4:34 AM in response to Simon Slavin

Hi Simon,


Thanks for your advise! The server is running quite smoothly so I'll probably just monitor it for now.


Looking at my memory usage do you think memory upgrade will be recommended at this stage? I've just recently learnt the meaning of Free/Wired/Active/Inactive, and if I'm correct it's still got 1/4 free space? (uptime was about 6 days)


Thanks again!

May 30, 2013 6:28 AM in response to burnduck

Memory management under OS X is very well done. Unless you're going to be storing a great deal of data in MySQL, or be serving tens of thousands of web pages an hour, 4Gig of memory should be fine.


The 1/4 free space (in fact, any amount of free space) doesn't really matter. OS X tries to efficiently use all the memory available to it. In other words, you shouldn't expect to see much memory free at any time: that would be inefficient use of your expensive hardware. If you leave your server running for another month or so, and the pie chart still looks like the one above, it's a sign that your server has found a balanced way of allocating memory and is working nicely.

Webserver/MySQL memory usage

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.