|
|
#1 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
/var/vm swapfiles have changed size
Greetings,
As many of us are aware, swap files in Jaguar were always 80000000 bytes (~76mb), I see that they are now dynamically sized. Is anyone else seeing this? Code:
yellow% lf total 524288 drwxr-xr-x 5 root wheel 170 24 Oct 20:24 ./ drwxr-xr-x 21 root wheel 714 24 Oct 19:21 ../ -rw------T 1 root wheel 67108864 24 Oct 18:04 swapfile0 -rw------T 1 root wheel 67108864 24 Oct 19:16 swapfile1 -rw------T 1 root wheel 134217728 24 Oct 20:24 swapfile2 |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
yep. new and improved, in increments of 64MB
|
|
|
|
|
|
#3 |
|
All Star
Join Date: Feb 2002
Location: peteyville
Posts: 794
|
Why make a 128MB Swapfile2, rather than a 64MB Swapfile2 and a 64MB Swapfile3?
bizarre. |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
And what's with the app_profile in there now?
drwx--x--x 8 root wheel 272 24 Oct 22:15 app_profile/ |
|
|
|
|
|
#5 | |||||||||||||||||||
|
All Star
Join Date: Feb 2002
Location: peteyville
Posts: 794
|
it's there in Jaguar. |
|||||||||||||||||||
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
Really? Weird.. I've never seen it before. Oh well.
|
|
|
|
|
|
#7 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
usage metrics. if large number of pageouts, then make a larger file. it's all about predictive behaviors. |
|||||||||||||||||||
|
|
|
|
|
#8 |
|
Prospect
Join Date: Sep 2003
Location: Sweden
Posts: 2
|
Could I ask a related question. My system (1GB RAM) in Jaguar often used only one swapfile. Now I seem to have three or more. Is this usual behaviour in Panther?
Yes, I do have Fast user switching on now and at least two accounts logged in. The reason I'm asking is that I'm concerned wether more swapfiles instead of normal panther behaviour is caused by memory leakage (I do not really know what that is, but understand that it is not desirable.) Thanks in advance. /ceffe |
|
|
|
|
|
#9 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 63
|
I'm not entirely sure about the dynamics of virtual memory. But at the very least I can tell you it's hard to say if your swap usage is indicative of a memory leak. I know this doesn't answer your question, but purely as a semi-educated guess, I'd say it's unlikely.
If you check Memory Usage in Activity Monitor, you will see that every Mac OS X process puts a fairly hefty load on the VM system. Here's a Sample... Eudora 213 MB Virtual Memory Safari 193 MB VM Finder 172 MB VM System UI Server 142 MB VM Activity Monitry 163 MB VM And last but not least... WindowServer 1.13 GB VM Wowza!! And I thought I was stylin' with 512 MB of RAM!! D'oh! Anyway with two users running, you can double all of those I listed (assuming your other user likes Eudora and Safari!). So that's probably the issue right there. As an aside lemme just tell you what a memory leak is. Programs must allocate memory to use it. When they're done with it, they need to de-allocate it so others can use it. Sometimes programs forget to de-allocate. That problem gets magnified when that forgetful piece of code gets run a whole bunch of times. So it's basically like unused memory leaking away from the system. The main way to tell is if you have a particular program growing (sometimes very slowly) out of control. Anyway, with the numbers above, I'm sure your VM is behaving correctly. -Pie Last edited by EatingPie; 10-29-2003 at 10:27 PM. |
|
|
|
|
|
#10 |
|
MVP
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
|
Is there any pattern to the size of the next swapfile created? Mine start out as yellow's do; the first two are the same, and then they began to double in size (usage went up too, of course, so this is in no means definitive.)
Code:
[Panther:~] us% ls -al /var/vm/ total 1048576 drwxr-xr-x 6 root wheel 204 29 Oct 23:37 . drwxr-xr-x 19 root wheel 646 29 Oct 06:25 .. -rw------T 1 root wheel 67108864 29 Oct 06:26 swapfile0 -rw------T 1 root wheel 67108864 29 Oct 13:27 swapfile1 -rw------T 1 root wheel 134217728 29 Oct 18:57 swapfile2 -rw------T 1 root wheel 268435456 29 Oct 19:44 swapfile3 |
|
|
|
|
|
#11 |
|
Site Admin
Join Date: Dec 2001
Location: Minneapolis, MN
Posts: 3,988
|
I see the same as MacMath. So, anybody see swapfile4 yet? 512MB?
You can pretty well guaranty Fast User Switching will eat a ton of memory, if they're all running apps at once. |
|
|
|
|
|
#12 |
|
MVP
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
|
One pattern would be that the size of the next swapfile is the sum of the sizes of all the preceding swapfiles. That scheme is consistent with the fact that the first two are the same size. The size of the next swapfile would still follow the pattern of being double the size of the previous one.
I claim no computer significance to the above pattern, just fulfilling the 'math' part of macmath. |
|
|
|
|
|
#13 |
|
Site Admin
Join Date: Dec 2001
Location: Minneapolis, MN
Posts: 3,988
|
Ahhh, Leonardo Pisano strikes again...
|
|
|
|
|
|
#14 |
|
MVP
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
|
Confirmed (that SizeOfSwapfile4 = 2*SizeOfSwapfile3= Sum of the sizes of all previous swapfiles)!
Code:
[Panther:~] haar% ls -al /var/vm total 1048576 drwxr-xr-x 7 root wheel 238 Oct 30 11:44 . drwxr-xr-x 19 root wheel 646 Oct 30 07:47 .. -rw------T 1 root wheel 67108864 Oct 30 07:47 swapfile0 -rw------T 1 root wheel 67108864 Oct 30 08:34 swapfile1 -rw------T 1 root wheel 134217728 Oct 30 08:35 swapfile2 -rw------T 1 root wheel 268435456 Oct 30 10:58 swapfile3 -rw------T 1 root wheel 536870912 Oct 30 11:44 swapfile4 [Edited to add: I used to kind of scoff at running an application which warns you of available free space (as being frivolous), but given the above, I now think they have their place. Either that, or it is time for some people to buy more memory/bigger drive. I still have 24 GB free so I'm not worried about these yet.] Last edited by macmath; 10-30-2003 at 01:10 PM. |
|
|
|
|
|
#15 |
|
MVP
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
|
Hey! It gave some swap space back.
I have not logged out or restarted all day. I just quit some of the many applications I had to open and have doing something so that I could get that 5th swapfile. Note: Code:
drwxr-xr-x 6 root wheel 204 Oct 30 16:50 . drwxr-xr-x 19 root wheel 646 Oct 30 07:47 .. -rw------T 1 root wheel 67108864 Oct 30 07:47 swapfile0 -rw------T 1 root wheel 67108864 Oct 30 08:34 swapfile1 -rw------T 1 root wheel 134217728 Oct 30 08:35 swapfile2 -rw------T 1 root wheel 268435456 Oct 30 10:58 swapfile3 |
|
|
|
|
|
#16 |
|
MVP
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
|
Wait!
After posting I noted that it surrendered some more: Code:
[Panther:~] haar% ls -al /var/vm total 262144 drwxr-xr-x 5 root wheel 170 Oct 30 16:52 . drwxr-xr-x 19 root wheel 646 Oct 30 07:47 .. -rw------T 1 root wheel 67108864 Oct 30 07:47 swapfile0 -rw------T 1 root wheel 67108864 Oct 30 08:34 swapfile1 -rw------T 1 root wheel 134217728 Oct 30 08:35 swapfile2 [Panther:~] haar% |
|
|
|
|
|
#17 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
dynamic working set trimming! finally! they put the VMS code back in
|
|
|
|
|
|
#18 |
|
Site Admin
Join Date: Dec 2001
Location: Minneapolis, MN
Posts: 3,988
|
That settles it. Worth the $129.
![]() oh kernel, my kernel... |
|
|
|
|
|
#19 |
|
All Star
Join Date: Feb 2002
Location: peteyville
Posts: 794
|
This behavior exists under Jaguar.
VM may possibly be more robust about returning swap space under Panther, but I'm running Jaguar and about an hour ago I quit Safari for the first time in days and 2 swapfiles disappeared. |
|
|
|
|
|
#20 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 63
|
This thread leads me to ask another question...
I created a separate Swap partition that is 5.1GB. With 512MB RAM, I'm wondering if this is big enough... What say you...?? And how 'bout with 1GB RAM?? -Pie |
|
|
|
![]() |
|
|