為什麼在1.3版本中,對SQL單目錄併發操作的優化無法在一般程式中顯現? #6285
Replies: 6 comments 10 replies
-
mdtest是通过fs层接口直接操作元数据,而你的python脚本使用的Path.create会经过内核系统调用和fuse层,这里消耗了性能。你可以使用我们的1.3新发布的python sdk来做测试,这会更接近mdtest的性能 |
Beta Was this translation helpful? Give feedback.
-
@Xuyuchao-juice @tanchihpin0517 我在测试我自己的场景的时候发现一个问题,跟你们的问题不直接相关,但看起来也许有关联。 |
Beta Was this translation helpful? Give feedback.
-
我用上面的python测试程序测试的,N=32, T=100000 ,lookup基本在0.5ms以下
差不多是 meta DB 是postgresql 17. object storage是ceph rados. juicefs 1.3.0. 不过我没有用writeback挂载参数, 我的是: meta DB URL参数是 |
Beta Was this translation helpful? Give feedback.
-
@Xuyuchao-juice 我的postgresql 17的setting ,我用的synchronous_commit =OFF也许对密集写入元数据的场景有利。其他参数都是比较常见的配置。DB后端是ceph RBD。
|
Beta Was this translation helpful? Give feedback.
-
怎么查看GOMAXPROCS? |
Beta Was this translation helpful? Give feedback.
-
此问题结论已经确定,是fuse内核限制导致的,详见: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
你好,我根據 這個 測試了1.3版本對SQL單文件夾併發性能的優化,測試指令如下:

juicefs mdtest "postgres://test:test123@myip:5432/postgres" --depth=1 --dirs=2 --files=100 --threads 100 --write 8192 mdtest
並且得到相似的測試結果:
在 mdtest 確實性能有顯著的提升
但是如果使用簡易的 python 來測試多線程在單文件夾創建文件的速度,卻無法得到優化後的性能:
juicefs stats:

測試代碼:
掛載指令:
juicefs mount "postgres://test:test123@myip/postgres" ./juicefs_postgres --writeback
請問為什麼測試代碼的併發性能會跟 mdtest 相差這麼多?
Beta Was this translation helpful? Give feedback.
All reactions