Date: Tue, 30 Aug 2011 13:09:12 -0700 From: Kirk McKusick <mckusick@mckusick.com> To: lev@freebsd.org Cc: freebsd-fs@freebsd.org Subject: Re: Very inconsistent (read) speed on UFS2 Message-ID: <201108302009.p7UK9CBQ085481@chez.mckusick.com> In-Reply-To: <317753422.20110830231815@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Now that you have defragmented your filesystem, we can factor that out of the equation. What is left is the management of the memory used for caching the files. I expect what is happening is that you are busily reading along and run out of free memory in which to read. This triggers a cleanup thread that churns through the memory pool to decide what should be thrown out to make room. Your reading process is demanding memory faster than the cleanup thread can produce it. The result is that your read idles (e.g., appears to run slowly). It is random because it depends on when you run out of memory. The cleanup is complex because it has to deal with all of memory and it wants to avoid a simple LRU which would cause the read of a large file to throw out a lot of things you would rather keep (like your window manager, browser, etc). Not sure what the best strategy is here. Kirk McKusick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108302009.p7UK9CBQ085481>