Very slow performance on git clone to a mounted folder #3929
Replies: 7 comments 19 replies
-
Basically JuiceFS (and most of distributed systems) is not suitable for workloads like
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer. For the use I need, I can't clone and then move. And the options did not help. It's weird that after the clone everything works really fast. I currently use s3backer and it appears to perform the same as a local disk both in the clone and in the rest of the use. What makes juicefs slow in clone? |
Beta Was this translation helpful? Give feedback.
-
Did you try |
Beta Was this translation helpful? Give feedback.
-
git issue many operations on metadata, which require fast meta engine. The MemoryDB is VERY slow to write, because it persistents log to a distributed storage for every transaction. So, it's expected to be VERY slow for git when MemoryDB is used as meta engine. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
与ubuntu系统自带的ext4文件系统相比,这个juicefs的小文件随机读写速度慢太多了。1万个小文件(大约120MB),读取需要7.6s(ext4只需要1.6秒),写入需要7分钟(ext4只需要30秒)。实验过程是: # 安装
curl -sSL https://d.juicefs.com/install | sh -
# 创建文件系统
juicefs format sqlite3://myjfs.db myjfs
# 挂载文件系统
juicefs mount sqlite3://myjfs.db ~/tmp/myjfs
# 写入数据(120MB,共10709个文件),耗时7分钟14秒
time cp -r ~/samples ~/tmp/myjfs/
# 读取数据(普通磁盘),耗时1.8秒
time zip -qr ~/xxx.zip samples/
# 读取数据(juicefs),耗时7.6秒
time zip -qr ~/xxx.zip samples/ |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue and I started a discussion on an idea here: #4853 However, I think this problem might be solvable if there is a distributed in-memory KV store with local caching. If each juicefs mounts a redis endpoint like redis://localhost:6379/ the latency to talk to the local metadata server will be very low. Now, the local KV store must be caching the reads and propagating the writes to the entire cluster. It seems on the surface that this thing can do it? https://github.com/distributedio/titan Basically, 2 questions:
Any pointers? |
Beta Was this translation helpful? Give feedback.
-
Very slow performance on git clone with a thousands of small files.
time git clone https://github.com/thiagoalvescosta/jose123.git
Result:
real 2m12.502s
user 0m3.184s
sys 0m3.836s
time git clone https://github.com/thiagoalvescosta/jose123.git
Result:
real 0m2.848s
user 0m2.348s
sys 0m0.912s
The difference is very big. I don't know why. I also tried with
--writeback
and was the sameI executed:
juicefs bench /home/ubuntu/juicefs -p 4
and got:Write big blocks count: 4096 / 4096 [==============================================================] done Read big blocks count: 4096 / 4096 [==============================================================] done Write small blocks count: 400 / 400 [==============================================================] done Read small blocks count: 400 / 400 [==============================================================] done Stat small files count: 400 / 400 [==============================================================] done Benchmark finished! BlockSize: 1 MiB, BigFileSize: 1024 MiB, SmallFileSize: 128 KiB, SmallFileCount: 100, NumThreads: 4 Time used: 37.5 s, CPU: 93.9%, Memory: 532.3 MiB +------------------+------------------+---------------+ | ITEM | VALUE | COST | +------------------+------------------+---------------+ | Write big file | 355.08 MiB/s | 11.54 s/file | | Read big file | 243.04 MiB/s | 16.85 s/file | | Write small file | 140.7 files/s | 28.43 ms/file | | Read small file | 594.6 files/s | 6.73 ms/file | | Stat file | 1646.3 files/s | 2.43 ms/file | | FUSE operation | 75643 operations | 1.96 ms/op | | Update meta | 1277 operations | 7.64 ms/op | | Put object | 1424 operations | 152.35 ms/op | | Get object | 0 operations | 0.00 ms/op | | Delete object | 0 operations | 0.00 ms/op | | Write into cache | 1424 operations | 218.87 ms/op | | Read from cache | 1430 operations | 290.81 ms/op | +------------------+------------------+---------------+
Environment:
cat /etc/os-release
):NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Beta Was this translation helpful? Give feedback.
All reactions