Drive to transfer virtual memory using MAC OS x

Source: Internet
Author: User


The design of virtual memory for MAC OS X lets us no longer use an application software to half the time to see a memory-less dialog box, and then have to turn off its application and set it up with a little more memory.



Virtual memory is to use the space of the hard disk as memory, according to DDIF this website said, if you have two hard drives, and the virtual memory used by the hard drive to the second hard drive, the overall efficiency of the system to improve.



Set the file location of the virtual memory interchange file in/ETC/RC, which will be set at the beginning of the Power-on program (start up sequence), with a row near the end of the file



swapdir = /private/var/vm



is to try to set the virtual memory and where to do the exchange of files.



The problem is, at the early stage of the boot process, the system has not seen the second hard drive, so we can't just change the path directly to the second hard drive in this place. So you need to put the following program code, early Mount the rest of the hard drive and so on.



##









You have to put this piece of code in the



Swapdir =/PRIAVTE/VAR/VM



Before that, the second disk can be Mount early and allow us to place the path of the virtual memory to swap the file on the second disk.



The path to the swap file must be changed after the disk is Mount out



Will



swapdir=/private/var/vm



Change into



swapdir=/Volumes/second_hard_drive/private/var/vm



Second_hard_drive is the name of your second hard drive.



In this way, after the reboot, the whole system should be running faster, especially when you are using multiple software.






# Mount any remaining filesystems



##



if [!-f/var/db/volinfo.database]; Then uninitialized_vsdb=-yes-; Fi



if ["${autodiskmount:=-yes-}"!= "-no-"]; Then



Consolemessage "Mounting Media"



Case ${autodiskmount} in



-removable-)



Autodiskmountflags= "a";; # Mount Removeable Media



*)



Autodiskmountflags= "";;



Esac



Autodiskmount-v ${autodiskmountflags}



Fi



if ["${uninitialized_vsdb:=-no-}" = "-yes-"]; Then vsdbutil-i; Fi


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.