Re: Downsides to madvise/fadvise(willneed) for application startup
From: Dave Chinner
Date: Mon Apr 05 2010 - 19:18:13 EST
On Mon, Apr 05, 2010 at 03:43:02PM -0700, Taras Glek wrote:
> I am working on improving Mozilla startup times. It turns out that
> page faults(caused by lack of cooperation between user/kernelspace)
> are the main cause of slow startup. I need some insights from
> someone who understands linux vm behavior.
> Current Situation:
> The dynamic linker mmap()s executable and data sections of our
> executable but it doesn't call madvise().
> By default page faults trigger 131072byte reads. To make matters
Try tuning /sys/block/<dev>/queue/read_ahead_kb and see if that
makes any difference - that's the default maximum readahead for the
given block device and defaults to 128k.
There has been some recent work to increase the default readahead
size, so if changing the default improves performance then perhaps
a fix for your problem is already in the works?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/