Squashfs 4.0 performance benchmark

From: Wenqiang Song
Date: Mon Jun 08 2009 - 10:13:23 EST


Hi folks,

I just did a performance test on Squashfs 4.0, similar to thisÂone:
http://www.celinuxforum.org/CelfPubWiki/SquashFsComparisons

The result is quit good. But I don't understand why performance is
better on a loop back file than raw partition.

My test machine:
AMDÂSempron(tm)ÂProcessorÂLE-1200, 2G memory

Ext4 uncompressed data: 2887704K
Squashfs 4.0 Image: 1256892K, generate by "mksquashfs . test.squash"

2.1.1ÂDirectoryÂLookupÂperformance
TimeÂtakenÂtoÂperformÂ"lsÂ-lRÂ--color=alawysÂ|ÂcatÂ>Â/dev/null"Âon
filesystemÂmounted

First time, Ext4
realÂÂÂÂ0m13.896s
userÂÂÂÂ0m3.556s
sysÂÂÂÂÂ0m4.436s

Second time, Ext4
realÂÂÂÂ0m6.700s
userÂÂÂÂ0m2.676s
sysÂÂÂÂÂ0m2.816s


First time, Squashfs on raw partition
realÂÂÂÂ0m9.850s
userÂÂÂÂ0m2.268s
sysÂÂÂÂÂ0m6.712s

Second time, Squashfs on raw partition
realÂÂÂÂ0m4.487s
userÂÂÂÂ0m2.096s
sysÂÂÂÂÂ0m2.392s


First time, Squashfs loop back file on an Ext4 partition.
realÂÂÂÂ0m8.356s
userÂÂÂÂ0m2.104s
sysÂÂÂÂÂ0m6.112s

Second time, Squashfs loop back file on an Ext4 partition.
realÂÂÂÂ0m5.112s
userÂÂÂÂ0m2.116s
sysÂÂÂÂÂ0m2.992s

---------------------------------------------------------------------------------------------
2.1.2ÂSequentialÂI/OÂperformance

TimeÂtakenÂtoÂperformÂ"tarÂcfÂ-Â|ÂcatÂ>Â/dev/null"ÂonÂfilesystemÂmounted

Ext4
realÂÂÂÂ5m28.694s
userÂÂÂÂ0m3.816s
sysÂÂÂÂÂ0m29.966s


Squashfs on raw partition
realÂÂÂÂ1m23.226s
userÂÂÂÂ0m2.416s
sysÂÂÂÂÂ1m2.680s


Squashfs loop back file on an Ext4 partition

realÂÂÂÂ0m53.867s
userÂÂÂÂ0m1.820s
sysÂÂÂÂÂ0m42.611s


--------------------------------------------------------------------------------------------
2.1.3ÂRandomÂI/OÂperformance
RandomÂaccessÂpatternÂgeneratedÂby findÂ.Â-typeÂfÂ-printfÂ"%sÂ%p\n"Â|
sortÂ-gÂ|ÂawkÂ'{ÂprintÂ$2Â}'Â>Â/tmp/sort

First time, Ext4
realÂÂÂÂ33m21.603s
userÂÂÂÂ0m5.724s
sysÂÂÂÂÂ0m33.734s

Squashfs on raw partition
realÂÂÂÂ7m35.962s
userÂÂÂÂ0m4.192s
sysÂÂÂÂÂ5m40.973s

Squashfs loop back file on an Ext4 partition
realÂÂÂÂ5m33.566s
userÂÂÂÂ0m3.316s
sysÂÂÂÂÂ4m47.942s

----------------------------------------------same test with 256M memory
Squashfs on raw partition
realÂÂÂÂ10m25.518s
userÂÂÂÂ0m4.432s
sysÂÂÂÂÂ6m41.133s

Squashfs loop back file on an Ext4 partition
realÂÂÂÂ11m0.271s
userÂÂÂÂ0m5.156s
sysÂÂÂÂÂ6m59.942s


Wenqiang Song

--
æåèïäçæïçéæèïçäçåçåæ
èåäïåäèïåèåèïäåèçååå
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i