|
|
#1 |
|
Prospect
Join Date: Mar 2012
Posts: 9
|
Hello All,
I am new to the Mac world and recently bought a late 2011 MBP 2011 13" with the i5 processor. What I have been trying to figure out is how can there be a VM size of: 193G when I have Dynamic paging disabled? ![]() Could someone please shed some light on this for me? Thanks in advance, KieferThomas |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
Please let us know your version of OS X, how much memory (not hard drive) you have installed, and exactly, precisely, and in great detail what method you used to disable dynamic paging. Then let us know where you are getting your VM size statistic from.
Trevor
__________________
How to ask questions the smart way |
|
|
|
|
|
#3 |
|
League Commissioner
Join Date: Aug 2006
Posts: 5,039
|
Given this and your other thread about trying to remove "unnecessary" kexts, and that you claim to be new to the Mac world, can I ask why you are trying to modify your Mac in these radical ways?
http://hintsforums.macworld.com/showthread.php?t=146340 What are you trying to achieve? Your Mac should run optimally without you having to managing the memory and kernel extensions yourself. I suspect that you will just spend a lot of time and effort and not see any benefit -- or actually make things worse. Indeed, it seems that disabling paging may cause Wired memory to continue to grow without being released. “Wired memory is not immediately released back to the free list when it becomes invalid. Instead it is “garbage collected” when the free-page count falls below the threshold that triggers page out events.” http://developer.apple.com/library/m...9714-TPXREF106 Last edited by benwiggy; 03-28-2012 at 10:56 AM. |
|
|
|
|
|
#4 | |||||||||||||||||||||||
|
Prospect
Join Date: Mar 2012
Posts: 9
|
Trevor, I am using Mac OS X Lion 10.7.3 (11D50), 8G of ram. I disabled Dynamic Paging using: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist I am getting the VM from Activity Montor : System Memory : VM size. Thanks Trevor. Side Note: For the record I am a REAL Mac transplant for using either virtualization or a Hackintosh. The two worlds of REAL Mac and the others are totally different and I am finding out what holds true in the others does not hold true in the Real Mac world. So I am a Newbie to the Mac World. Last edited by KieferThomas; 03-28-2012 at 11:58 AM. |
|||||||||||||||||||||||
|
|
|
|
|
#5 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,806
|
@KieferThomas
Please stop as you are getting to point that will more than likely start messing up your system and stability. Let Mac OS do its Unix magic under the hood and get on and and enjoy your new Mac. You are trying to "fix" things that are not broken ;-) |
|
|
|
|
|
#6 | ||||||||||||||||||||||||||||||||||||||||||||||
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
I've seen that command used in Snow Leopard, but I'm not sure if it works the same in Lion or not. Do you have any documentation other than your own experience about it working with Lion?
What do you get from the following commands, copy/pasted into your Terminal? du -sh /var/vm ls -lh /var/vm vm_stat echo "done" Trevor
__________________
How to ask questions the smart way |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
#7 |
|
League Commissioner
Join Date: Aug 2006
Posts: 5,039
|
Also note that in the MacOSXHint that trevor has linked to, the comments show mixed results. Some people report crashing, freezing and slowness; others report no difference; some report an improvement.
Others suggest that VM gets turned on again after running the command: "I've noted that after about three hours of work on my 2006 MBP with only 2Gb of RAM, swap has been reactivated, so I gather the system kind of protects itself against a potential shortage of memory by reinstating virtual memory after a while. That, or putting your Mac to sleep reactivates VM somehow... I did that, but I don't know if VM came back after my MBP woke up, or if it was already back before it even went to sleep..." "I ran the terminal commands>Restarted>Opened Activity Monitor>Chose the System Memory Tab>VM Size: around 190.55GB… Shouldn’t this be 0?" |
|
|
|
|
|
#8 |
|
Prospect
Join Date: Mar 2012
Posts: 9
|
Trevor,
The documentation I have used is from the net and the: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist was listed on multiple pages for Lion 10.7.3 as well as for Snow Leo. I have run the commands from the terminal with what I am believing is the Dynamic Paging disabled with the following results: Keiths-MacBook-Pro:~ Kiefers$ du -sh /var/vm 8.0G /var/vm Keiths-MacBook-Pro:~ Kiefers$ ls -lh /var/vm total 16777216 -rw------T 1 root wheel 8.0G Mar 27 17:58 sleepimage Keiths-MacBook-Pro:~ Kiefers$ vm_stat Mach Virtual Memory Statistics: (page size of 4096 bytes) Pages free: 1379496. Pages active: 53312. Pages inactive: 54869. Pages speculative: 211569. Pages wired down: 397437. "Translation faults": 2686483. Pages copy-on-write: 430643. Pages zero filled: 839090. Pages reactivated: 1. Pageins: 45018. Pageouts: 0. Object cache: 11 hits of 5221 lookups (0% hit rate) Thanks, KieferTomas |
|
|
|
|
|
#9 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
|
Then you will probably rarely actually use paged memory. I have 6Gb, and /var/vm barely gets any use. Virtual memory is built into unix systems at a very low level - some of the OS install CDs even set up a ramdisk for virtual memory (and if that isn't the definition of "pointless") probably because it was easier than disabling the whole thing. As others have said, you are tinkering with some very low-level processes that take care of themselves just fine - the end result is more likely a broken system than a better system. Last edited by acme.mail.order; 03-28-2012 at 06:43 PM. |
|||||||||||||||||||||||
|
|
|
|
|
#10 |
|
MVP
Join Date: Aug 2009
Posts: 1,119
|
Modern operating systems always use some virtual memory. If only for some basic housekeeping. Turning off virtual memory may even impact performance in a negative way. Regardless of how much physical memory the machine has.
|
|
|
|
|
|
#11 | |||||||||||||||||||||||
|
Hall of Famer
Join Date: Dec 2007
Posts: 3,641
|
In case it's of use to those trying to help, these links may be of use (the comments at both are probably worth a look): Article from the main Hints site Article referenced in that hint from OS X Daily |
|||||||||||||||||||||||
|
|
|
|
|
#12 |
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
Code:
Keiths-MacBook-Pro:~ Kiefers$ ls -lh /var/vm total 16777216 -rw------T 1 root wheel 8.0G Mar 27 17:58 sleepimage Trevor
__________________
How to ask questions the smart way Last edited by trevor; 03-29-2012 at 11:11 AM. |
|
|
|
|
|
#13 |
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
I've been reading about virtual memory, and I believe that the disconnect is in interpretation.
Activity Monitor is correctly telling you that your computer is using 193 GB of virtual memory, because (as acme.mail.order and SirDice both mention above), you can't really turn off virtual memory, it's being used for memory management of your entire memory space. You didn't and probably cannot turn off virtual memory. What you turned off is dynamic paging, and dynamic paging is one tool in the toolchest of virtual memory, but it is not the same thing. Dynamic paging is when pages of memory are swapped out to your hard drive. And from the fact that you aren't using any swapfiles, I believe that you have successfully turned off dynamic paging, at least at the point in time when you checked the /var/vm directory. As mentioned above, I'm not an expert in this subject, and I welcome feedback from people who know more about it than I do. Trevor
__________________
How to ask questions the smart way |
|
|
|
|
|
#14 |
|
Prospect
Join Date: Mar 2012
Posts: 9
|
Trevor,
Thank you for the link and the reply and a direct answer to my question. From the way I was interpreting it the dynamic paging was being used like Windoz uses the swapfile and now from your response and the link I see this is not the case. Thanks again, Kiefer |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|