Re: efficacy of Linux w/o swap
phil-news-nospam_at_ipal.net
Date: 05/16/05
- Next message: Robert Redelmeier: "Re: efficacy of Linux w/o swap"
- Previous message: phil-news-nospam_at_ipal.net: "Re: efficacy of Linux w/o swap"
- In reply to: Nix: "Re: efficacy of Linux w/o swap"
- Next in thread: Robert Redelmeier: "Re: efficacy of Linux w/o swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 May 2005 14:53:35 GMT
On Mon, 16 May 2005 13:55:09 +0100 Nix <nix-razor-pit@esperi.org.uk> wrote:
| On 16 May 2005, phil-news-nospam@ipal.net spake:
|> One issue that I've experienced plaguing Linux in the past (especially
|> in many early 2.4 kernels) is that heavy writing to disk resulted in
|> large scale caching of the written data in RAM, resulting in fewer
|
| It also blocked reads and writes by other processes :/
That was noticed, too. :-(
|> usable RAM pagses for process VM, resulting in more processes being
|> swapped out. When I tested these scenarios with swap disabled, things
|> actually got worse, rather than better. It seems the caching still was
|> being done, but this time the kernel choked on RAM being totally full
|> and spent large amounts of CPU doing some kind of activity looking for
|> available pages. The way I observed this was through virtual console
|> (X was not running) switching. When I was in tty1 and pressed Alt-F2
|> to go to tty2, it would pause and not switch for quite some time, then
|> evetually complete the switch. Worst case event took 2.5 minutes.
|>
|> Are these problems definitely cured in 2.6 at least at the current
|> versions?
|
| Well, one problem with 2.4 was that the kernel only had mappings from
| virtual->physical addresses, so when memory was tight it had to iterate
| through hordes of pages looking for just a few to swap out.
That would explain the kernel freezing up.
| In 2.6, an inverse mapping is maintained, making identifying pages to
| swap in very-low-memory situations much more CPU-efficient. I've noticed
| no kswapd-caused pauses in 2.6; nor have I noticed the 2.4 problem that
| a cache full of massive numbers of dirty pages being written to a slow
| device blocks *all* writes to *all* devices... I think the problem there
| was the block device request queues, but I'm not sure.
So maybe O_DIRECT could help, too. During video capture, there will be
little or nothing for any other process to do that would involve writing
to any disk. I don't even need a syslog on this machine (it's whole life
will be that of a drone/worker). Or I could syslog over the LAN to the
master that oversees these drones.
| Plus, in 2.6 there are a variety of disk schedulers. You probably want
| CONFIG_IOSCHED_DEADLINE (for must-be-done-by-*this*-time I/O) or
| CONFIG_IOSCHED_CFQ (which endeavours to give everyone using the disks a
| fair share of time).
How do you specify when the deadline is?
Really, the only logic I would need is: just write this data now and don't
even try to keep it around in RAM for any reason whatsoever. The data being
written for video capture won't be needed until the entire capture is done,
and we're talking about 50 GB to 150 GB a shot (for uncompressed video ...
that may change if I decide to try to squeeze compression into the capture
process). If I had that much RAM I wouldn't need disk at all. I expect to
put 1 GB, or maybe 2 GB, of RAM in each drone, and run a ring buffer on the
order of 256 MB to 512 MB (this part would be shared between the reader and
writer processes if I go with the process model, which I likely will as it
is less complex than threading, and I have no other need for threads here).
-- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | -----------------------------------------------------------------------------
- Next message: Robert Redelmeier: "Re: efficacy of Linux w/o swap"
- Previous message: phil-news-nospam_at_ipal.net: "Re: efficacy of Linux w/o swap"
- In reply to: Nix: "Re: efficacy of Linux w/o swap"
- Next in thread: Robert Redelmeier: "Re: efficacy of Linux w/o swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|