linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* write is faster whan seek?
@ 2008-06-11  7:20 Dmitri Monakhov
  2008-06-11  7:48 ` Jens Axboe
  2008-06-11 11:38 ` Alan D. Brunelle
  0 siblings, 2 replies; 11+ messages in thread
From: Dmitri Monakhov @ 2008-06-11  7:20 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: jens.axboe

I've found what any non continious sequence violation  result in significant
pefrormance drawback. I've two types of requests:
1)Ideally sequential  writes:
   for(i=0;i<num;i++) {
       write(fd, chunk, page_size*32);
   } 
   fsync(fd);

2) Sequential writes with dgap for each 32'th page
   for(i=0;i<num;i++) {
       write(fd, chunk, page_size*31);
       lseek(fd, page_size, SEEK_CUR);
   }
   fsync(fd);

I've found what second IO pattern is about twice times slower whan the first 
one regardless to ioscheduler or HW disk. It is not clear to me why this
happen. Is it linux speciffic or general hardware behaviour speciffic.
I've naively expected what disk hardware cat merge several 31-paged
requests in to continious one by filling holes by some sort of dummy activity.
        

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-06-16 12:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-11  7:20 write is faster whan seek? Dmitri Monakhov
2008-06-11  7:48 ` Jens Axboe
2008-06-11  8:11   ` Dmitri Monakhov
2008-06-11  8:26     ` Jens Axboe
2008-06-11  9:28       ` Dmitri Monakhov
2008-06-11  9:38         ` Jens Axboe
2008-06-11 11:38 ` Alan D. Brunelle
2008-06-11 11:49   ` Jens Axboe
2008-06-11 11:52     ` Alan D. Brunelle
2008-06-11 11:55       ` Jens Axboe
2008-06-16 12:14         ` Dmitri Monakhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).