swapping/paging on 10.2.2

pedz

Registered
Does 10.2.2 swap to a file in the startup volume or does it allocate a seperate partition? I can't find much of anything on how 10.2.2 swaps and pages like how to see how much of the paging space has been used, how much is available, where it is, etc.

I have an application that is running out of memory so I'm trying to figure out if it is out of swap space or if it is hitting the per process limit.

Thanks,
pedz
 
Application memory running low is more likely to do with a memory leak in the application. If your OSX machine has 256MB RAM or more, then this is very likely the cause, not OSX. If you have less than this, then it is time to get more RAM. The SWAPFILE will expand as much as needed, but for it to get so large as to be troublesome could only be a badly memory leaking app.

By default OSX has it's SWAPFILE on the boot hard disc &/or partition. It uses a minimum of 80MB disc space, though this can fluctuate to as much as 500MB in some unique cases, though this is uncommon, and is usually a sign of poor coding in the app responsible (eg Suitcase 10 storing a large number of it's font catalogue previews).

You can relocated your SWAPFILE to a dedicated partition or secondary hard disc for improved performance, both in terms of reduced file system fragmentation, and SWAPFILE access speed. I have a dedicated SWAPFILE partition on my single hard disc, and I get about a 5% performance boost over the standard setup. This may not sound like much, but it is noticable. It can improve performance by as much as 20% if relocated to a dedicated secondary hard drive.

If you want to do this, a good tool for the job is called SwapCop, which can be found on Versiontracker.com. The app is easy to use and has clear instructions and tips.

NOTE: to re-partition your hard drive you will need to wipe your hard disc, so this is something best planned before instaling your OSX operating system.
 
Thanks.

I have 1G of ram. The application is started fresh. I'm trying to load a 900M image and it dies before it can display the image. (The app is viewscan.)

The owner of viewscan says I'm running out of memory but that is a big vague to me. So I'm trying to figure out if it is an application limit or a swap file limit.
 
download system manager from version tracker. it has a really good memory graph. launch system manager and then watch the memory graph as you open this 900mb file. you will see your free / unused ram get eaten up and then if you run out, you will see disk swapping.

you could just use top to do this as well, but system manager gives you a good graphical representation on whats going on.
 
Swap is stored as files, in /var/vm. I don't believe there's an explicit limit on total vm size, other than the obvious constraint of free disk space.

vm_stat and vmmap will probably also prove useful.
 
Why would you be loading an image INTO viewscan (it's scanning software, right?). There is no reason to scan an image with viewscan to produce an image THAT big either (not at a true resolution, anyway).

As for Application memory size, apps still have a 1GB memory allocation per app I believe (certainly for classic apps).
That said, you should consider that OSX will need about 128Mb of RAM for the OS, even before memory for the app. Though even if you HAD enough ram to load the system into + the app's, most apps still would be paging some out to disc (either scratch disc or Virtual Memory).

My suspicion is that you are trying to manipulate an image that is bigger than necessary (900Mb?!! - WHY?!), which is why you are having trouble loading it.

As for SWAPFILE space, the limit is limited only to free disc space on the disc your SWAPFILE is on.
 
Back
Top