问题原文
原帖链接 · fromcloud · CC BY-SA 3.0
Extracting 7zip with many small files on linux xfs, extraction speed is so slow.
My Test System Environment.
- System1 : 2vCore/4GB CentOS 6.5 64bit guest on XenServer.
- System2 : 2vCore/4GB Windows 2012 guest on XenServer.
Large small files Creation Script
#!/bin/bash
for i in {1..100000}
do
dd if=/dev/zero of=./dmp/dd$i.dmp bs=1K count=4
done
ok. I got 4KB files of 100,000 in dmp directory. and then I formatted /testfs with xfs.
Test
Compression Time on System1 :
# time 7za a dmp.7z ./dmp --> real 0m27.518s
Extraction Time on System1:
# time 7za x dmp.7z -o/testfs --> real 9m5.420s
- 7za use only single core.
- Dirent system call use most of the CPU time.
Extraction Time on System2:
- around 25s
- 7za use multi-core.
My Question
Although system2 use multi-core and system1 use single-core, such a big different result is unreliable. I think. How can I explain this ?
If I use xfs on linux for extracting 7zip file, How can I speed up ? any idea ?
Thanks in advance.
社区高分解答
原帖链接 · bfontaine · CC BY-SA 4.0
I had the same issue, and the fix was to upgrade 7z. On Ubuntu 20.04 LTS, the 7z you get from apt install is from 2016. Instead, go download the latest version from the official website.
For the same archive with 60k small files on the same server, I went from 8 minutes to 6 seconds(!).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
