Re: Swap file tracking

2013-12-07 Thread steve harley

on 2013-12-05 22:09 LuKreme wrote


On 05 Dec 2013, at 13:32 , steve harley st...@paper-ape.com wrote:


ls -l /var/vm/swapfile* | awk '{ foo+= $5 } END { printf swap is %2.1f MB, 
foo/1024^3 }'


1024^3 is GB.


yup - i think a few years ago i did a hasty edit; it was originally 1024^2, but 
i wanted fewer digits


what puzzles me is why the awk loop doesn't work when i issue the above command 
directly in the shell - works fine as a script file



___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-06 Thread R. O. Durrer
Could it be a sleepimage ?
On my Mini mid 2011 (running 10.6.8), there are two rather small swapfiles (67 
MB each), and a huge sleepimage of 8.52 GB in private:var:vm 
Rudolf


Am 04.12.2013 um 18.46 schrieb Neil Laubenthal:

 On Dec 4, 2013, at 12:41 PM, list boy i.am.list@gmail.com wrote:
 Anyone know if there's a way (via the console/Terminal) to track swap file 
 size, over time?
 
 You can ls /private/var/vm of course…but I don’t think the actual size of the 
 swap files in there goes down unless you reboot in which case they get 
 deleted. I routinely have 4 or 5 of them in there. 
 
 I thought I understood this stuff…but Activity Monitor shows 8.11 GB of VM 
 currently while I only have a 67MB and a 1GB actual swap file. Where does the 
 over almost 7GB of VM reside?
___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-05 Thread steve harley

on 2013-12-04 10:46 Neil Laubenthal wrote

On Dec 4, 2013, at 12:41 PM, list boy i.am.list@gmail.com wrote:

Anyone know if there's a way (via the console/Terminal) to track swap file 
size, over time?


i used to have this shell script assigned to a keyboard shortcut:

#!/bin/bash
ls -l /var/vm/swapfile* | awk '{ foo+= $5 } END { printf swap is %2.1f MB, 
foo/1024^3 }' | growlnotify


you can get growlnotify from here:

http://growl.info/downloads

you could re-purpose this to send output to a log file



You can ls /private/var/vm of course…but I don’t think the actual size of the 
swap files in there goes down unless you reboot in which case they get deleted.


they do go down, but not exactly proportion to memory you free up, and not 
immediately




I thought I understood this stuff…but Activity Monitor shows 8.11 GB of VM 
currently while I only have a 67MB and a 1GB actual swap file. Where does the 
over almost 7GB of VM reside?


most of that VM is probably mapped to files on disk (other than the swap files) 
or to memory shared with other processes (whether on disk or in RAM)


i believe it's also possible to allocate memory but never reference it and thus 
have it exist as an address that is neither in RAM nor on disk



___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-05 Thread LuKreme
On 04 Dec 2013, at 10:46 , Neil Laubenthal n...@laubenthal.net wrote:
 I thought I understood this stuff…but Activity Monitor shows 8.11 GB of VM 
 currently while I only have a 67MB and a 1GB actual swap file.

NB: You will *always* have at least 1GB swapfile under 10.9. (actually, I think 
you will have a 64MB file and a 1GB file at minimum).

 Where does the over almost 7GB of VM reside?

It doesn't, it's virtual.

-- 
Love is like oxygen / You get too much / you get too high / Not enough
and you're gonna die

___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-05 Thread LuKreme

On 05 Dec 2013, at 13:32 , steve harley st...@paper-ape.com wrote:

 ls -l /var/vm/swapfile* | awk '{ foo+= $5 } END { printf swap is %2.1f MB, 
 foo/1024^3 }' 

1024^3 is GB.

-- 
I have NOT lost my mind!  I've got a backup around here somewhere.

___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Swap file tracking

2013-12-04 Thread list boy
Anyone know if there's a way (via the console/Terminal) to track swap file 
size, over time?

(I think data will help my cause)

 
___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread Neil Laubenthal
On Dec 4, 2013, at 12:41 PM, list boy i.am.list@gmail.com wrote:
 Anyone know if there's a way (via the console/Terminal) to track swap file 
 size, over time?
 
You can ls /private/var/vm of course…but I don’t think the actual size of the 
swap files in there goes down unless you reboot in which case they get deleted. 
I routinely have 4 or 5 of them in there. 

I thought I understood this stuff…but Activity Monitor shows 8.11 GB of VM 
currently while I only have a 67MB and a 1GB actual swap file. Where does the 
over almost 7GB of VM reside?


---
There are only three kinds of stress; your basic nuclear stress, cooking 
stress, and A$$hole stress. The key to their relationship is Jello.

neil



___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread Jochem Huhmann
Neil Laubenthal n...@laubenthal.net writes:

 I thought I understood this stuff…but Activity Monitor shows 8.11 GB
 of VM currently while I only have a 67MB and a 1GB actual swap file.
 Where does the over almost 7GB of VM reside?

In imaginary land... Most of this probably is memory mapped/reserved by
some processes that never was used, so it's basically more imaginary
than even virtual.

I think these days the only sane way to deal with this is to stuff all
the memory sticks into your machine that it can take and then never
think about it again.


Jochem

-- 
 A designer knows he has arrived at perfection not when there is no 
 longer anything to add, but when there is no longer anything to take away.
 - Antoine de Saint-Exupery 

___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread Arno Hautala
On Wed, Dec 4, 2013 at 12:46 PM, Neil Laubenthal n...@laubenthal.net wrote:

 […] but I don’t think the actual size of the swap files in there goes down
 unless you reboot in which case they get deleted.

I've definitely seen the number of swap files decrease. Rarely, but
I've seen it a handful of times.

-- 
arno  s  hautala/-|   a...@alum.wpi.edu

pgp b2c9d448
___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread Neil Laubenthal
There's a lot to be said for that. 

neil

The three kinds of stress…nuclear, cooking and ahole. Jello is the key to the 
relationship. 

 On Dec 4, 2013, at 13:19, Jochem Huhmann j...@gmx.net wrote:
 
 stuff all
 the memory sticks into your machine that it can take
___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread list boy
Agreed, except I'm at 4 GB (which I believe was the max for a MacBook Air 4,2)

And it seems like most people gasp when I tell them my swap file size(s).

So maybe (?) my particular case has something especially wrong with it... 
(like, say, a Sandforce SSD)


On Dec 4, 2013, at 1:19 PM, Jochem Huhmann j...@gmx.net wrote:

 I think these days the only sane way to deal with this is to stuff all
 the memory sticks into your machine that it can take and then never
 think about it again.

___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk


Re: Swap file tracking

2013-12-04 Thread Michael
10.7.5 definitely will reduce swapfile size when programs free up memory. 
Today, for example, I was at 8 GB of swap file, and now I'm down to 4 GB.

Earlier versions would not; at least as recently as 10.4, and I think 10.5 on 
the PPC, swapfile space would only be reclaimed if everything after point X was 
free. It would not compress the swapfile, but instead relied on everything 
going away. Naturally, that didn't happen often.

I consistently find that if I log out, and log back in, swap used is down to 
around 250 MB, yet for whatever reason, the swap files (there are more than 1) 
will never go below 1 GB of disk space.

I agree, more memory is the answer. The better question is why; why not run 
happily in 16 MB inside a pizza box?___
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk