| To: | Andrew Morton <akpm@xxxxxxxx> |
|---|---|
| Subject: | Re: XFS filesystem performance drop in kernels 2.6.16+ |
| From: | Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx> |
| Date: | Sat, 11 Nov 2006 11:55:53 +0100 (MET) |
| Cc: | "Igor A. Valcov" <viaprog@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| In-reply-to: | <20061110225257.63f91851.akpm@osdl.org> |
| References: | <bde600590611090930g3ab97aq3c76d7bca4ec267f@mail.gmail.com> <4553F3C6.2030807@sandeen.net> <Pine.LNX.4.61.0611101259490.6068@yvahk01.tjqt.qr> <bde600590611100516u7b8ca1bfs74d3cc8b78eb3520@mail.gmail.com> <20061110225257.63f91851.akpm@osdl.org> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
>> for (i = 0; i < 262144; i++) {
>> /* Write data to a big file */
>> write (nFiles [0], buf, __BYTES);
>>
>> /* Write data to small files */
>> for (f = 1; f < __FILES; f++)
>> write (nFiles [f], &f, sizeof (f));
>> }
>
>This sits in a loop doing write(fd, buf, 4). This is wildly inefficient -
>you'd get a 10x throughput benefit and maybe 100x reduction in CPU cost
>simply by switching to fwrite().
Well yes and no. The problem here is the syscall overhead. fwrite
buffers things, so needless syscalls are avoided.
The same could be done by changing the program logic and increasing the
size argument to read/write.
>I suspect something went wrong here.
Design error. :)
-`J'
--
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | XFS Update for 2.6.19 - take 2, Timothy Shimmin |
|---|---|
| Next by Date: | Re: [PATCH] remove unused filp from ioctl functions, Christoph Hellwig |
| Previous by Thread: | Re: XFS filesystem performance drop in kernels 2.6.16+, Andrew Morton |
| Next by Thread: | Re: [PATCH] remove old irix log replay cases, Timothy Shimmin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |