Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > moving swap to another disk

moving swap to another disk
Thread Tools
patpro
Guest
Status:
Reply With Quote
Dec 9, 2000, 11:48 PM
 
Hello,

MacOS X virtual memory seems really close (at least in appearence) to NeXT virtual memory (swapfiles stored in /private/...). But unfortunately, swaptab (man swaptab) looks like a no longer supported feature.
Due to the lack of MacOS X documentation, I'm not certain of what NeXT features are still active under MacOS X. I would like to put swapfiles on another faster HD, but I can't find how to do this.

I would also like creating a RAM disk. As I have a pretty confortable amount of RAM (448 Mo) I can easily spend 128 or 192 Mo for a RAM disk. Is it possible with MacOS X ?

And finaly (some of you have already guess) if above questions have a positive answer, is it possible to store swapfile ON the RAM disk ?

--- last news :

after further investigation, it appears that swaptab is used on MacOS XS, but not in MacOS X.
I've made a 'grep swap *' in the /etc/ directory. It pointed out that in MacOS X the file rc is handling swap init. So I've edited the rc file by replacing :

swapdir=/private/var/vm

by

swapdir=/scratch/vm

where 'scratch' is an empty partition of my second IDE HD. (with an empty folder 'vm' at its root)

Unfortunately, next reboot created a folder called 'scratch' at '/' and mounted the volume 'scratch' as 'scratch 1'. It's quite strange because in rc file, mount seems to occur before swap init....

So, for now, I can put swap file where I want to... but only on the boot disk : absolutely not interesting.

I wonder what this could lead to :

swapdir=/dev/disk2s11/vm # it's the device mounted on 'scratch'

total anihilation of my system or hack on the day ? As /dev/disk2s11 is not a folder, I'll bet on anihilation, but who knows...

[This message has been edited by patpro (edited 12-10-2000).]
     
hidozage
Fresh-Faced Recruit
Join Date: Mar 1999
Location: Utica
Status: Offline
Reply With Quote
Dec 10, 2000, 09:52 PM
 
what I really wanted to do under Mac OS X PB is turn off swap. any ideas?

"Apple is like a strange drug that you just can't quite get enough of, They shouldn't call it Mac. They should call it crack!" musician Barry Adamson told the Guardian newspaper.
     
Scott_H
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Dec 10, 2000, 10:10 PM
 
Due to the techy nature of this I'm going to move this over to the Mac OS X Support forum. Click through to find your post.
     
zpincus
Dedicated MacNNer
Join Date: Dec 2000
Location: stanford, ca, usa
Status: Offline
Reply With Quote
Dec 10, 2000, 10:24 PM
 
Turning off swap or offloading it to a ramdisk (same thing, essentially, but the former is a bit more clean) really isn't a good idea.

VM made previous versions of the Mac OS really sluggish. But the *NIX idea of swap, especially as implemented in BSD, is a very high performance system that doesn't slow anything down until you've actually maxed out the RAM. Then (AFAIK) the disk is used to page infrequently used mem areas to reclaim the space for more frequent uses. It makes your system use the RAM it has a lot more efficiently. Apple's old implementation had a lot of paging problems, used a lot of disk space, and, basically sucked. *NIX-style paging is more like how RamDoubler ran (minus the compression) but a lot more mature and geared 100% for performance.


Don't believe me? The major servers here on campus that run Solaris, our IRIX graphicks workstations, et. al. all have about 3x (at least) swap as RAM. The swap boosts performance on heavily loaded systems (insofar as being able to do more with only a minimal hit in speed is better than not being able to do more). Every major corporate server out there uses swap to make its RAM use more efficient under loaded circumstances. This alone should convince you that it isn't a performance drain likethe VM of OS 9 and below.

Also, in a multiuser system where you have a lot of daemons logged in that usually aren't doing a whole lot (sshd, ftpd, apache, to name a few), it is REALLY HELPFUL to be able to page these fellows to disk and use "their" RAM for current apps, and only have them using system RAM when active (serving pages, or files, and the like. Since I don't run a really actice web page, its nice to not have the apache system in real RAM all the time.)

Does that help?

Zach
     
zpincus
Dedicated MacNNer
Join Date: Dec 2000
Location: stanford, ca, usa
Status: Offline
Reply With Quote
Dec 10, 2000, 10:25 PM
 
Turning off swap or offloading it to a ramdisk (same thing, essentially, but the former is a bit more clean) really isn't a good idea.

VM made previous versions of the Mac OS really sluggish. But the *NIX idea of swap, especially as implemented in BSD, is a very high performance system that doesn't slow anything down until you've actually maxed out the RAM. Then (AFAIK) the disk is used to page infrequently used mem areas to reclaim the space for more frequent uses. It makes your system use the RAM it has a lot more efficiently. Apple's old implementation had a lot of paging problems, used a lot of disk space, and, basically sucked. *NIX-style paging is more like how RamDoubler ran (minus the compression) but a lot more mature and geared 100% for performance.


Don't believe me? The major servers here on campus that run Solaris, our IRIX graphicks workstations, et. al. all have about 3x (at least) swap as RAM. The swap boosts performance on heavily loaded systems (insofar as being able to do more with only a minimal hit in speed is better than not being able to do more). Every major corporate server out there uses swap to make its RAM use more efficient under loaded circumstances. This alone should convince you that it isn't a performance drain likethe VM of OS 9 and below.

Also, in a multiuser system where you have a lot of daemons logged in that usually aren't doing a whole lot (sshd, ftpd, apache, to name a few), it is REALLY HELPFUL to be able to page these fellows to disk and use "their" RAM for current apps, and only have them using system RAM when active (serving pages, or files, and the like. Since I don't run a really actice web page, its nice to not have the apache system in real RAM all the time.)

Does that help?

Zach
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:19 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,