The image build time of `-Efragments` will be greatly reduced.

Processors:   Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz (96 cores)
Memory:       384 GiB
Mkfs options: -zlzma,6 -Efragments -C1048576
 
__________________________________________________________________________________
|______ Testset _____|________|_______ Vanilla _________|_________ After 
__________|
|  CoreOS            |  Size  |__ 660484096 (630 MiB) __|___ 660475904 (630 
MiB) __|
|____________________|_ Time _|_______ 4m12.249s _______|_______ 1m49.828s 
________|
|  Fedora KIWI       |  Size  |_ 2554892288 (2437 MiB) _|__ 2554793984 (2436 
MiB) _|
|____________________|_ Time _|_______ 19m8.141s _______|_______ 6m22.378s 
________|

It is now preferred to use `-Efragments` over `-Eall-fragments`, since
placing all data in the packed inode (`-Eall-fragments`) could introduce
some performance penalty.

Signed-off-by: Gao Xiang <hsiang...@linux.alibaba.com>
---
 lib/fragments.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fragments.c b/lib/fragments.c
index ce079af..1f24f70 100644
--- a/lib/fragments.c
+++ b/lib/fragments.c
@@ -31,7 +31,7 @@ struct erofs_fragmentitem {
 };
 
 #define EROFS_FRAGMENT_INMEM_SZ_MAX    (256 * 1024)
-#define EROFS_TOF_HASHLEN              16
+#define EROFS_TOF_HASHLEN              64
 
 #define FRAGMENT_HASHSIZE              65536
 #define FRAGMENT_HASH(c)               ((c) & (FRAGMENT_HASHSIZE - 1))
-- 
2.43.5


Reply via email to