Re: swap cache

Ramakrishna K (ramak@wipinfo.soft.net)
Mon, 21 Dec 1998 12:43:53 -0500 (GMT)


> ramak@wipinfo.soft.net (Ramakrishna K) said:
>
> > Also i was thinking about one of the other suggestions that was made
> > regardin g the compression of a page(s) to a portion of the RAM, and
> > uncompress it as part of the swap back in. Although the
> > compression/un-compression has to be measured against the I/O cost.
>
> Not only. Your CPU can be happily computing away at process A while
> process B pages in some. However, if this "pagein" is really "uncompress a
> page from RAM", your process A looses the use of the CPU. Might be a win
> in (mostly) one-process (i.e., one-user) machines, but I wouldn't loose
> sleep over that: Today's one-user PCs are mostly grotesquely overpowered
> anyway, and the added complexity isn't worth a minor performance advantage
> for personal use, IMVHO.
Your right, the compression/decompression will take away some CPU cycles. Also
this may be a very bad idea for a single CPU box.
>
> Or is there something else I'm overlooking here?
It's a very crazy thought. May be it may not work at all. Looking from the
perspective of large systems ( assuming there is lots of RAM ).

a) If there is lots of swapping activity and when we swap the process out, the
I/O can be reduced by compressing the pages and putting on the disk. But as
you rightly pointed out this will eat into CPU cycles. All the same if we
have a real efficient Algorithm for compression/decompression, might be worth
a look. This can be a good-option if we are swapping out large data.

b) Again very much a strange thought. If we have some support from hardware which
take care of compressing/decompressing data which can then be swapped out.

All this * might * be a viable option only on the basis of the cost involved in
eating up CPU cycles vis-a-vis large I/O due to swapping.

Would be great to hear the comments from others.

thanks,
Rama.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/