Sponsored in part by... Freeverse Freeverse, Inc.'s SOUND STUDIO 3.5.5 - Sound Studio is for anyone
who needs to record or edit audio with a professional tool, but at
a consumer price. Perfect for Podcasts, Music, More! Now updated
for OS X 10.5 Leopard. <http://www.freeverse.com/soundstudio>

 [F] TidBITS  / TidBITS  / TidBITS Talk  /

Virtual memory swapping problem

[Massengale, John]John Massengale - 08:21am Aug 30, 2005 PST

Whenever my 17" PowerBook has to go back to Apple (it's about to go for it's fourth time), I have to use a 14" iBook G3 without much RAM. Over time, that always becomes extremely slow. At its worst, switching applications in the dock or even switching tabs in Firefox can produce 45 to 60 seconds of the spinning wheel, and even typing text in a dialogue box can have 15 second or more delays between letters. The worst also includes a lot of writing to disk, and slow starts and closes.

I fixed the problem once by wiping out the drive when I installed Tiger. But the problem is back.

Yesterday, I was starting to get some writing to disk, and a lot of wheel spinning. I cleared the Firefox cache, and the entire computer got much better, in all applications.. It was set at 50000 KB. I reset it to 10000 KB.

Note: Firefox got stuck clearing the cache. Twenty minutes after I started clearing the cache, the spinning wheel would start every time I clicked on the Firefox preferences window to click OK to close the box.

Can a Firefox cache wreak this much havoc?



[Sounds entirely plausible. Run top from Terminal and look at the pageins and pageouts in the information at the top of the screen; if the numbers in the parens are changing a lot as you work, you're swapping heavily, and on a slow disk, that's going to hurt performance a lot. -Adam]


Mark as Read
  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages

Matt Neuburg (apparently) - Aug 30, 2005 6:24 pm (#1 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 2654
Re: Virtual memory swapping problem

On or about 8/30/05 8:21 AM, thus spake "John Massengale"
<johnmassengale.com>:
> Can a Firefox cache wreak this much havoc?
>
> [Sounds entirely plausible. Run top from Terminal

That won't show you what you want to know, which is whether swapfiles are
being generated. Use my freeware app MemoryStick, which is for exactly this
purpose - it tracks pageouts *and* swapfile generation (and shows you your
memory filling up and spilling over). And yes, this can be a problem. My
iBook G3 maxes out RAM at 640MB and I still get massive delays while
swapfiles are generated when I use certain RAM-intensive apps such as
Amadeus. If you can't add memory, you'll just have to live with it. m.

--
matt neuburg, phd = matttidbits.com, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide -
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/




jason314 (apparently) - Aug 30, 2005 6:24 pm (#2 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 45
Re: Virtual memory swapping problem

How full is your hard drive?
        I know that windows boxes turn to custard if there isn't at least
twice as much free disk space as you have RAM. I've heard that OSX
doesn't like the drive being too full either but I've never experienced
this, 200Gb is a lot of hard drive space to fill up.

Jason


-------------------------------------
Jason Campbell
Technician
Psychology Department
University of Otago

Ph (03) 479 7668


barefootguru (apparently) - Sep 1, 2005 8:04 am (#3 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 115
Re: Virtual memory swapping problem

On 2005-08-31, at 13:24 , Matt Neuburg wrote:

> That won't show you what you want to know, which is whether
> swapfiles are
> being generated. Use my freeware app MemoryStick, which is for
> exactly this
> purpose - it tracks pageouts *and* swapfile generation

While Matt's program may be the nicest way to view this, it's still
very easy from the command line:

ls -l /var/vm

will list the virtual memory paging files. Note the first 4
(swapfile0-swapfile3) increase in size, after that they max out at
0.5 GiB each.

These files are created and released as needed (releasing doesn't
happen very often).

As a comparison, with a stack of apps open and 2 GiB of RAM, I have
between 4 and 8 of these.

Cheers

Chris Pepper (apparently) - Sep 1, 2005 3:08 pm (#4 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 845
Re: Virtual memory swapping problem

At 8:04 AM -0700 2005/09/01, Tom Robinson wrote:
>On 2005-08-31, at 13:24 , Matt Neuburg wrote:
>
>>That won't show you what you want to know, which is whether
>>swapfiles are
>>being generated. Use my freeware app MemoryStick, which is for
>>exactly this
>>purpose - it tracks pageouts *and* swapfile generation
>
>While Matt's program may be the nicest way to view this, it's still
>very easy from the command line:
>
>ls -l /var/vm
>
>will list the virtual memory paging files. Note the first 4
>(swapfile0-swapfile3) increase in size, after that they max out at
>0.5 GiB each.

        Better (from the shell) is du:

>peppersalt:~$ du -h /var/vm /var/vm/*
>du: /var/vm/app_profile: Permission denied
>1.5G /var/vm
>du: /var/vm/app_profile: Permission denied
> 64M /var/vm/swapfile0
> 64M /var/vm/swapfile1
>128M /var/vm/swapfile2
>256M /var/vm/swapfile3
>512M /var/vm/swapfile4
>512M /var/vm/swapfile5


>These files are created and released as needed (releasing doesn't
>happen very often).

        If my system used 1.5gb of VM, and then most of the programs
closed and the swapfiles were *mostly* unused (say 5mb in each
actually holding swapped-out data), du/ls output would be exactly the
same as on a system with 1.5gb actively in use. Programs like
MemoryStick, top, vmstat, etc., count allocated VM, not allocated
disk blocks, so are smarter for this stuff.

--
Chris Pepper: <http://www.reppep.com/~pepper/>
Rockefeller University: <http://www.rockefeller.edu/>

Nik (apparently) - Sep 5, 2005 1:16 pm (#5 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 386
Re: Virtual memory swapping problem

On Aug 30, 2005, at 9:21 AM, John Massengale wrote:

> Can a Firefox cache wreak this much havoc?

Firefox is also very leaky in memory and frequently gloms onto huge
amounts of virtual and real memory. This is a problem on both the PC
and Mac versions of the program. (And no, I'm afraid Camino isn't
much better.)

This is one of the main reasons I stick to Safari or OmniWeb for
browsing. The memory use and system degradation of Firefox is a real
pain. However, by just quitting and restarting Firefox you can clear
up most of these problems.

You also mention that you're using a Mac without much RAM. More RAM
makes OS X run a ton better. 512 MB or more is ideal for best performance.

--Nik

Matt Neuburg (apparently) - Sep 6, 2005 2:54 pm (#6 Total: 6)  

Reply to this message
via email  

Photo of Author
Posts: 2654
Re: Virtual memory swapping problem

On or about 9/5/05 1:16 PM, thus spake "Nik" <gerberinik.net>:

> On Aug 30, 2005, at 9:21 AM, John Massengale wrote:
>
>> Can a Firefox cache wreak this much havoc?
>
> Firefox is also very leaky in memory

Just one more data point along these lines: a few days ago, as the author of
MemoryStick, I had an email from a user disturbed at how much of his 1 GB of
RAM was being consumed (all of it). I interpreted his "top" output for him;
it turned out that BitTorrent was eating his entire memory. As I advised
him, this is no terrible thing as long as you don't use BitTorrent very
much. Try not to use rogue apps or leaky apps, but even if you occasionally
have to do so, bear in mind that the question is whether you have enough RAM
for what you *normally* do. m.

--
matt neuburg, phd = matttidbits.com, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide -
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/





  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages


 [F] TidBITS  / TidBITS  / TidBITS Talk  / Virtual memory swapping problem




Add a message

To add a message to this discussion, you must be a registered user. Enter your email address below. If you have an account associated with the email address you enter, you will be prompted for your password. If not, you'll be able to create a new account with no fuss.

Enter your email address:

Submit