[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Clear Swap Cache
- Subject: Re: [cobalt-users] Clear Swap Cache
- From: "Robert G. Fisher" <rfisher@xxxxxxxxxxxxxxx>
- Date: Mon Mar 6 05:47:16 2000
On Mon, Mar 06, 2000 at 05:31:20AM -0800, Alan Stanley wrote:
> Is it possible to manually clear the swap cache without having to resort to
> a reboot? Even long after the swap was needed, the cached swap remains when
> it is no longer needed. I would like to clear it every one and a while
> without having to reboot. Any ideas? I'm using a Raq3i.
Technically, Linux uses paging rather than swapping -- at least on the
processors that support this such as the x86 boards in the Raq3i.
What this means is that portions of processes are swapped out in
pages rather than entire processes. Therefore you need to step
through the process table via ps or another code that will walk the
/proc directory for you to see what is and isn't paged out.
dd if=/dev/zero of=/dev/<swap> count=<sizeof swap>
That would zero out your swap space, but it may well cause your
machine to crash. Leave swap space alone, let the kernel handle
that...
--
Robert G. Fisher NEOCOM Microspecialists Inc.
System Administrator/Programmer (540) 666-9533 x 116