|
|
Don't waste your time with this
This is entirely unnecessary. Mac OS X's virtual memory management is not this stupid, and doesn't need your help. When a process requests memory, it is allocated to the process in its virtual memory space. When the process actually uses the memory it has allocated, it gets real memory to do so. When the process is done using the memory and deallocates it, the OS marks that real memory as "inactive", but doesn't remove it from the process's virtual memory space. This saves a little bit of time if the process later requests additional memory. When another processes needs to use real memory, it is allocated from free memory first, then from "inactive" memory. Neither requires anything to be paged to disk, etc. By restarting apache repeatedly, you are ensuring that the memory must be allocated "fresh" every time. This isn't a lot of effort, but it's entirely unnecessary! That was already done the first time the process requested it. Once the process is done with it, it's entirely available to other applications, no matter what you think the numbers mean, that you see in Activity Monitor.app or /usr/bin/top. It's a really silly idea to think that it's worth stopping and restarting processes every five minutes, given the hundreds of man years of development that have gone into the kernel's memory management techniques. The kernel knows a _lot_ more about how to manage memory than we individuals do. Just like you wouldn't rebuild the engine in your car with entirely new headers, valves, and cylinders unless you really believed you knew more about tuning engines for your situation than the manufacturer did, you probably shouldn't worry about the low levels of memory management on your OS until you truly understand what it's already doing for you. Trust the kernel and the kernel developers. They've been solving these problems for a very, very long time. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.47 seconds |
|