On 12/18/06, Erik Mouw <mouw@xxxxxxxxxxxx> wrote: <...snip...>
> > But isn't O_DIRECT supposed to bypass buffering in Kernel? It is. > Doesn't it directly write to disk? Yes, but it still uses an IO scheduler.
Ok. but i also tried with noop to turnoff disk scheduling effects. There was still timing differences. Usually i get 3100 microseconds but upto 20000 microseconds at certain intervals. I am just using gettimeofday between two writes to read the timing.
In your first message you mentioned you were using an ancient 2.6.10 kernel. That kernel uses the anticipatory IO scheduler. Update to the latest stable kernel (2.6.19.1 at time of writing) and it will default to the CFQ scheduler which has a smoother writeout, plus you can give your process a different IO scheduling class and level (see Documentation/block/ioprio.txt).
Thanks... i will try with CFQ. Nick Piggin:
but they look like they might be a (HZ quantised) delay coming from block layer plugging.
Sorry i didn´t understand what you mean. To minimise scheduling effects i tried giving it maximum priority. -- --------------------------------------------------------------- regards Manish Regmi --------------------------------------------------------------- UNIX without a C Compiler is like eating Spaghetti with your mouth sewn shut. It just doesn't make sense. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/