On Mon, May 10, 2010 at 05:33:07PM +0100, Tiago Marques wrote: > On Mon, May 10, 2010 at 7:37 AM, James Cameron <qu...@laptop.org> wrote: > On Sat, May 08, 2010 at 05:24:00PM +0000, Tiago Marques wrote: > > I was just looking into this and the issue with SD cards' random write > > performance intrigued me in this particular case. Isn't recording > > being performed sequentially, hence no lag problem? > > At the moment, assuming an application that opens a file, and writes to > it at _any_ speed, occasionally the write will block for a huge amount > of time. [...] > > Now this is surprising given that the I/O rate is trivial, and that > there is ample memory for buffering the writes. > > Indeed. But that's the price paid for non-cached 0.04KB/s random write > media.
I'm worried you might not have understood my point. I don't believe it should have anything to do with the speed of the media. In this first test, the rate of the application write is much lower than the random write speed of the media. It is as if the kernel is failing to buffer a write, instead blocking it for the duration of some media related event. I think this is wrong. I won't consider different filesystems or I/O schedulers until I can see why the kernel fails to buffer a write. Because if it is going to do this, then no matter what filesystem or scheduler is used, it will happen again. Userspace should be permitted to continue execution. > [r...@xo-a7-2a-5a tmp]# echo 1 > /proc/sys/vm/drop_caches > [r...@xo-a7-2a-5a tmp]# echo 2 > /proc/sys/vm/drop_caches > [r...@xo-a7-2a-5a tmp]# echo 3 > /proc/sys/vm/drop_caches > [r...@xo-a7-2a-5a tmp]# free > [r...@xo-a7-2a-5a tmp]# time strace -o /tmp/k -e write -T dd if=/dev/zero > of=/root/file bs=8192 count=32000 > [r...@xo-a7-2a-5a tmp]# free > [r...@xo-a7-2a-5a tmp]# grep write k|cut -f2 -d'<'|cut -f1 -d'>'|sort > -rn|more > 11.648413 > 8.020875 > 4.299857 > > I've no explanation for this behaviour. > > hmmm? But this is to the tmpfs??? Not so. This is to SD card. /root is on SD card. Please reconsider your reply in that light. -- James Cameron http://quozl.linux.org.au/ _______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel