public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* UBIFS performance with no_chk_data_crc option
@ 2009-01-27  0:09 Reuben Dowle
  2009-01-27 12:35 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Reuben Dowle @ 2009-01-27  0:09 UTC (permalink / raw)
  To: linux-mtd

It seems to me that enabling the no_chk_data_crc option actually causes
SLOWER read performance. I get these results:

umount NOS
mount -t ubifs -o ro,no_chk_data_crc /usr/share/NOS/
echo 3 > /proc/sys/vm/drop_caches
time cat NOS/charts/Navico/ShadedRelief/_3DTexture_1024_0_World.at5 >
/dev/null
real    0m 17.55s
user    0m 0.00s
sys     0m 17.53s

umount NOS
mount -t ubifs -o ro,chk_data_crc /usr/share/NOS/
echo 3 > /proc/sys/vm/drop_caches
time cat NOS/charts/Navico/ShadedRelief/_3DTexture_1024_0_World.at5 >
/dev/null
real    0m 12.12s
user    0m 0.01s
sys     0m 12.09s

I also check what the performance is with defaults:

umount NOS
echo 3 > /proc/sys/vm/drop_caches
time cat NOS/charts/Navico/ShadedRelief/_3DTexture_1024_0_World.at5 >
/dev/null
real    0m 17.90s
user    0m 0.01s
sys     0m 17.87s

So it seems:
- defaults (documentation says this is checking CRC) -> slow
- no crc checks -> slow
- explicitely enabled crc checks -> fast

This seems very repeatable. I get the same numbers every time. I think
perhaps the logic of the mount options is reversed?

Regards,
Reuben Dowle
Design Engineer
Navico Asia Pacific

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

* Re: UBIFS performance with no_chk_data_crc option
  2009-01-27  0:09 UBIFS performance with no_chk_data_crc option Reuben Dowle
@ 2009-01-27 12:35 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2009-01-27 12:35 UTC (permalink / raw)
  To: Reuben Dowle; +Cc: linux-mtd

On Tue, 2009-01-27 at 13:09 +1300, Reuben Dowle wrote:
> It seems to me that enabling the no_chk_data_crc option actually causes
> SLOWER read performance. I get these results:

Reuben,

thanks for noticing this. We've fixed the issue. You may find the fix in
the linux-next branch of the ubifs-2.6.git tree:

commit 6f7ab6d458bbfc2f55d295fa3e6b9e69cdb1d517
Author: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Date:   Tue Jan 27 16:12:31 2009 +0200

    UBIFS: fix no_chk_data_crc

    When data CRC checking is disabled, UBIFS returns incorrect return
    code from the 'try_read_node()' function (0 instead of 1, which means
    CRC error), which make the caller re-read the data node again, but using
    a different code patch, so the second read is fine. Thus, we read the
    same node twice. And the result of this is that UBIFS is slower
    with no_chk_data_crc option than it is with chk_data_crc option.
    This patches fixes the problem.

    Reported-by: Reuben Dowle <Reuben.Dowle@navico.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

This patch has also been pushed to all UBIFS back-port git trees.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

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

end of thread, other threads:[~2009-01-27 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27  0:09 UBIFS performance with no_chk_data_crc option Reuben Dowle
2009-01-27 12:35 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox