Windows Swapping out Java

Of course if you need 2 or more GB of RAM life is a bit more expensive. Then you probably have to use the more expensive and usually slower 1GB RAM modules. I only need this sort of space occasionally, so swapping is appropriate.

The big difference between a native application swapping out and a java application swapping out, is that java also swaps out the whole VM with the application. so, if you are trying to accomdate the “look and feel” of a platform, obviously waiting considerably more time for a java application to swap the VM (which should be thought of as system level code in many circumstances) and application back in doesn’t cut it (at least on winbloze.) at a minimum, i’d love to see the VM implementors provide some runtime switches that allow the deployer to mark pages used by the VM as non-pageable.

swap free on my notebook and laughing at swappers since 2000 :>

Actually the really irritating bit is that often a large part of what is swapped out and then back in is garbage. Since swapping is such a slow operation it would be great to somehow interact with the collector to GC and possibly reduce the allocated heap before deciding to swap. But the implementations of virtual memory are too low level for that to work.

Garbage collection and swapfiles are a mingling of two completely incompatible concepts. A bit like using virtual memory for disk cacheing - pointless. If you’re going to use garbage collection you need to be pretty sure that the heap won’t get swapped out or it is inevitable that performance will be absolutely hopeless next to a native application.

I don’t think the VM being swapped out is such a big deal but it makes sound sense to put it into a nonpaged area, or even in the kernel nonpaged area.

Cas :slight_smile:

I’m still swap free at home and at work. :slight_smile:

I spoke with a friend here at work and he turned his off. Later he turned it back on, since he was running out of ram often. He’s the type of user who runs so many apps at the same time, you can barely click between the app buttons on the task bar, as there so small. :slight_smile: For him, he agreed that not using the swap was faster, but he was willing to ‘bear the pain’ of having his programs swap in and out, rather than stop running 500 apps at the same time.

I wonder why MS doesn’t just make their swap usage more agressive, by starting with a much smaller swap size and only increasing it when physical ram is at say 75% usage. At least then it would make a bit more sense. IMHO.

Dr. A>

I agree. I tried disabling swap to circumvent the slowness, and all I got was OutOfMemory errors :wink: 512mb of ram just isn’t enough anymore ;D