[lkml]   [2004]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: why swap at all?
Catalin BOIE wrote:
> Hello!
>> But swap behaviour kills performance even when memory is more than
>> adequate. Consider building a DVD image in a 4GB system. The i/o
>> forces all of the unused programs out, in spite of the fact that an
>> extra 100MB doesn't make a measurable difference in performance. But
>> when I click Mozilla paging most of it in from disk make a big
>> difference in performance to the user.
> I think that kernel cannot know that you need some data once or more.
> This is fadvise for.
> With my wrapper ( for fadvise you can do this:
> noca mkisofs -R -o /tmp/1.iso /tmp/data
> This means:
> NOCA_SIZE: Call fadvise only after 128KiB was read/wrote.
> NOCA_RA: call fadvise with POSIX_FADV_SEQUENTIAL
> NOCA_READ: use fadvise(POSIX_FADV_DONTNEED) for reads (because you don't
> need anymore the source files)
> NOCA_WRITE: use fadvise(POSIX_FADV_DONTNEED) for writes (because it's
> useless to cache the end of the ISO)
> Do this program resolve your problem?

It addresses one of the cases which trigger problems, certainly. Thank you.
>> The problems with small memory are different in kind, when not even
>> the programs will fit in memory at the same time, or will leave next
>> to nothing for i/o, swap is required for performance. But on a large
>> memory system I believe the gain to pain ratio is way too low with the
>> current VM. The solution at the moment is to turn off swap, which as
>> you note has other problems (can't move between zones without swap?)
>> which in theory could really hang a system.

-bill davidsen (
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [W:0.056 / U:2.844 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site