Date: Tue, 30 Aug 2011 17:40:07 -0500 (CDT) From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us> To: Lev Serebryakov <lev@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: Very inconsistent (read) speed on UFS2 Message-ID: <alpine.GSO.2.01.1108301735030.3028@freddy.simplesystems.org> In-Reply-To: <1693072185.20110831022933@serebryakov.spb.ru> References: <317753422.20110830231815@serebryakov.spb.ru> <201108302009.p7UK9CBQ085481@chez.mckusick.com> <103666698.20110831021404@serebryakov.spb.ru> <1693072185.20110831022933@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 31 Aug 2011, Lev Serebryakov wrote: > >> I'll try this experiment with mmap() and touching every 4096-th byte of >> mapped memory instead of read(2). > Strange enough, it gives only 40-50MiB/s and results are very > consistent. > > It really surprise me. I didn't think, that there will be so much > difference, I was sure, that it will be almost equivalent speed. FreeBSD does not seem to default to sequential read-ahead when memory mapping is used with sequential page access. Try using madvise() with the MADV_SEQUENTIAL option and see if it helps. There are also MADV_WILLNEED, MADV_DONTNEED, and MADV_FREE. Careful use of these options can help performance quite a lot when data is large compared to memory. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.2.01.1108301735030.3028>
