Weird performance problem with CephFS
Hi All, I'm running a small 19.2.2 squid Ceph Cluster, 5 nodes, 4 HDDs per nodes, EC 5+3 and 2 chunks per node on 2 distinct OSDs. It is our first step in building a Ceph storage in the lab. We use CephFS and the storage is mounted on 3 small clusters for large data storage. I run (for testing) our favorite simulation code on the CephFS storage using 10 processors on a single compute node in the cluster with Slurm (srun -N 1 -n 10 ./case). One of the processes write progression informations in a text file called solver_case_00.log. Running a small test, 100 temporal iterations, requires around 38s on the compute node and with this approach all is fine. But, if from the the cluster front end (or another client) I just run "tail solver_case_00.log", only one time, at the begining of the run, the code performances slow down drastically requiring near 15mn of runtime instead of 38s. The slowdown is global in the code (as output in solver_case_00.log is called from many routines). This does not occure if I run the application and the tail command on the same node. This does not occure if the storage is on our old NFS v4 storage. This is a very weird problem that I try to solve and I need help about this. Patrick
Hi Patrick, Thanks for the clear report, it made this easy to reproduce. I can reproduce it with both the kernel client and ceph-fuse: one process appending small lines to a file on one client, and a single "tail" of that file from another client. The writer drops from ~120,000 writes/s to ~85 writes/s and stays there for as long as the reading node keeps the file in its cache, which is why your 38 s run takes 15 minutes. What happens: - While tail has the file open, two clients use it, so the MDS takes away the writer's right to buffer writes (the "Fb" capability). Each write() then goes synchronously to the OSDs. On an EC 5+3 HDD pool, every small write is a partial-stripe overwrite, so it is very slow. That part is expected and only lasts while the file is open on both clients. - The bug is what happens after tail exits. The reading client keeps the file's capabilities cached, but never tells the MDS that it no longer wants to read the file. The MDS still counts it as a reader, so the writer never gets buffered writes back. It does not happen when tail runs on the same node, because then there is only one client. NFS has no such capability mechanism. Workaround until the fix is in a release: after looking at the file, drop the caches on the node where you ran tail: echo 2 > /proc/sys/vm/drop_caches That releases the cached capabilities, and the writer is back to full speed within a second. Unmounting CephFS on that node has the same effect. To confirm it is the same problem on your cluster, while the job is slow, run this on the MDS host (<ino> is the inode number from "ls -i solver_case_00.log"): ceph tell mds.<name> dump inode <ino> The "filelock" state stays "mix", and the client where you ran tail is still listed with "wanted": "pFscr", although tail has exited. Tracker: https://tracker.ceph.com/issues/83627 Fixes for both the kernel client and ceph-fuse/libcephfs are on the way; with them the writer gets back to full speed a few seconds after tail exits. Could you tell us which client the front end and the compute nodes use (kernel client and kernel version, or ceph-fuse)? Thanks, Xiubo On Thu, 26 Nov 2026 at 18:13, PATRICK BEGOU <ceph-users@ceph.io> wrote:
Hi All,
I'm running a small 19.2.2 squid Ceph Cluster, 5 nodes, 4 HDDs per nodes, EC 5+3 and 2 chunks per node on 2 distinct OSDs. It is our first step in building a Ceph storage in the lab. We use CephFS and the storage is mounted on 3 small clusters for large data storage.
I run (for testing) our favorite simulation code on the CephFS storage using 10 processors on a single compute node in the cluster with Slurm (srun -N 1 -n 10 ./case). One of the processes write progression informations in a text file called solver_case_00.log.
Running a small test, 100 temporal iterations, requires around 38s on the compute node and with this approach all is fine.
But, if from the the cluster front end (or another client) I just run "tail solver_case_00.log", only one time, at the begining of the run, the code performances slow down drastically requiring near 15mn of runtime instead of 38s. The slowdown is global in the code (as output in solver_case_00.log is called from many routines).
This does not occure if I run the application and the tail command on the same node. This does not occure if the storage is on our old NFS v4 storage.
This is a very weird problem that I try to solve and I need help about this.
Patrick _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
Hi Li, Thank you for this impressive responsiveness! I'm running a Cephadm deployment of Squid 19.2.2 on 5 nodes running Almalinux 9. It's my first deployment of a Ceph cluster. Clients are also Almalinux 9 with kernel mount. Linux Kernels: - clients 5.14.0-611 or 6.1.173-1 and libcephfs2-19.2.2-0.el9.x86_64 - Ceph nodes 5.14.0-570 "echo 2 > /proc/sys/vm/drop_caches" is not available for users, only for admins on the clients. Do you think your patch will be backported in Squid ? Thanks Patrick De: "Xiubo Li" <xiubo.li@clyso.com> À: "PATRICK BEGOU" <patrick.begou@univ-grenoble-alpes.fr> Cc: "ceph-users" <ceph-users@ceph.io> Envoyé: Vendredi 27 Novembre 2026 05:29:47 Objet: Re: [ceph-users] Weird performance problem with CephFS Hi Patrick, Thanks for the clear report, it made this easy to reproduce. I can reproduce it with both the kernel client and ceph-fuse: one process appending small lines to a file on one client, and a single "tail" of that file from another client. The writer drops from ~120,000 writes/s to ~85 writes/s and stays there for as long as the reading node keeps the file in its cache, which is why your 38 s run takes 15 minutes. What happens: - While tail has the file open, two clients use it, so the MDS takes away the writer's right to buffer writes (the "Fb" capability). Each write() then goes synchronously to the OSDs. On an EC 5+3 HDD pool, every small write is a partial-stripe overwrite, so it is very slow. That part is expected and only lasts while the file is open on both clients. - The bug is what happens after tail exits. The reading client keeps the file's capabilities cached, but never tells the MDS that it no longer wants to read the file. The MDS still counts it as a reader, so the writer never gets buffered writes back. It does not happen when tail runs on the same node, because then there is only one client. NFS has no such capability mechanism. Workaround until the fix is in a release: after looking at the file, drop the caches on the node where you ran tail: echo 2 > /proc/sys/vm/drop_caches That releases the cached capabilities, and the writer is back to full speed within a second. Unmounting CephFS on that node has the same effect. To confirm it is the same problem on your cluster, while the job is slow, run this on the MDS host (<ino> is the inode number from "ls -i solver_case_00.log"): ceph tell mds.<name> dump inode <ino> The "filelock" state stays "mix", and the client where you ran tail is still listed with "wanted": "pFscr", although tail has exited. Tracker: https://tracker.ceph.com/issues/83627 Fixes for both the kernel client and ceph-fuse/libcephfs are on the way; with them the writer gets back to full speed a few seconds after tail exits. Could you tell us which client the front end and the compute nodes use (kernel client and kernel version, or ceph-fuse)? Thanks, Xiubo On Thu, 26 Nov 2026 at 18:13, PATRICK BEGOU <ceph-users@ceph.io> wrote:
Hi All,
I'm running a small 19.2.2 squid Ceph Cluster, 5 nodes, 4 HDDs per nodes, EC 5+3 and 2 chunks per node on 2 distinct OSDs. It is our first step in building a Ceph storage in the lab. We use CephFS and the storage is mounted on 3 small clusters for large data storage.
I run (for testing) our favorite simulation code on the CephFS storage using 10 processors on a single compute node in the cluster with Slurm (srun -N 1 -n 10 ./case). One of the processes write progression informations in a text file called solver_case_00.log.
Running a small test, 100 temporal iterations, requires around 38s on the compute node and with this approach all is fine.
But, if from the the cluster front end (or another client) I just run "tail solver_case_00.log", only one time, at the begining of the run, the code performances slow down drastically requiring near 15mn of runtime instead of 38s. The slowdown is global in the code (as output in solver_case_00.log is called from many routines).
This does not occure if I run the application and the tail command on the same node. This does not occure if the storage is on our old NFS v4 storage.
This is a very weird problem that I try to solve and I need help about this.
Patrick _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
Hi Patrick, Since you use the kernel mount, the fix is in the CephFS kernel client, not in Ceph, so a Squid backport would not help and no Ceph upgrade is needed. The kernel patch will go to the stable kernels once it is merged upstream. Until then, running tail on the compute node that runs the job avoids the problem, or an admin can let users run the drop_caches command through sudo. Thanks, Xiubo On Fri, 27 Nov 2026 at 09:04, PATRICK BEGOU <patrick.begou@univ-grenoble-alpes.fr> wrote:
Hi Li,
Thank you for this impressive responsiveness! I'm running a Cephadm deployment of Squid 19.2.2 on 5 nodes running Almalinux 9. It's my first deployment of a Ceph cluster. Clients are also Almalinux 9 with kernel mount.
Linux Kernels: - clients 5.14.0-611 or 6.1.173-1 and libcephfs2-19.2.2-0.el9.x86_64 - Ceph nodes 5.14.0-570
"echo 2 > /proc/sys/vm/drop_caches" is not available for users, only for admins on the clients.
Do you think your patch will be backported in Squid ?
Thanks
Patrick
________________________________ De: "Xiubo Li" <xiubo.li@clyso.com> À: "PATRICK BEGOU" <patrick.begou@univ-grenoble-alpes.fr> Cc: "ceph-users" <ceph-users@ceph.io> Envoyé: Vendredi 27 Novembre 2026 05:29:47 Objet: Re: [ceph-users] Weird performance problem with CephFS
Hi Patrick,
Thanks for the clear report, it made this easy to reproduce. I can reproduce it with both the kernel client and ceph-fuse: one process appending small lines to a file on one client, and a single "tail" of that file from another client. The writer drops from ~120,000 writes/s to ~85 writes/s and stays there for as long as the reading node keeps the file in its cache, which is why your 38 s run takes 15 minutes.
What happens:
- While tail has the file open, two clients use it, so the MDS takes away the writer's right to buffer writes (the "Fb" capability). Each write() then goes synchronously to the OSDs. On an EC 5+3 HDD pool, every small write is a partial-stripe overwrite, so it is very slow. That part is expected and only lasts while the file is open on both clients. - The bug is what happens after tail exits. The reading client keeps the file's capabilities cached, but never tells the MDS that it no longer wants to read the file. The MDS still counts it as a reader, so the writer never gets buffered writes back.
It does not happen when tail runs on the same node, because then there is only one client. NFS has no such capability mechanism.
Workaround until the fix is in a release: after looking at the file, drop the caches on the node where you ran tail:
echo 2 > /proc/sys/vm/drop_caches
That releases the cached capabilities, and the writer is back to full speed within a second. Unmounting CephFS on that node has the same effect.
To confirm it is the same problem on your cluster, while the job is slow, run this on the MDS host (<ino> is the inode number from "ls -i solver_case_00.log"):
ceph tell mds.<name> dump inode <ino>
The "filelock" state stays "mix", and the client where you ran tail is still listed with "wanted": "pFscr", although tail has exited.
Tracker: https://tracker.ceph.com/issues/83627
Fixes for both the kernel client and ceph-fuse/libcephfs are on the way; with them the writer gets back to full speed a few seconds after tail exits. Could you tell us which client the front end and the compute nodes use (kernel client and kernel version, or ceph-fuse)?
Thanks, Xiubo
On Thu, 26 Nov 2026 at 18:13, PATRICK BEGOU <ceph-users@ceph.io> wrote:
Hi All,
I'm running a small 19.2.2 squid Ceph Cluster, 5 nodes, 4 HDDs per nodes, EC 5+3 and 2 chunks per node on 2 distinct OSDs. It is our first step in building a Ceph storage in the lab. We use CephFS and the storage is mounted on 3 small clusters for large data storage.
I run (for testing) our favorite simulation code on the CephFS storage using 10 processors on a single compute node in the cluster with Slurm (srun -N 1 -n 10 ./case). One of the processes write progression informations in a text file called solver_case_00.log.
Running a small test, 100 temporal iterations, requires around 38s on the compute node and with this approach all is fine.
But, if from the the cluster front end (or another client) I just run "tail solver_case_00.log", only one time, at the begining of the run, the code performances slow down drastically requiring near 15mn of runtime instead of 38s. The slowdown is global in the code (as output in solver_case_00.log is called from many routines).
This does not occure if I run the application and the tail command on the same node. This does not occure if the storage is on our old NFS v4 storage.
This is a very weird problem that I try to solve and I need help about this.
Patrick _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
participants (2)
-
PATRICK BEGOU
-
Xiubo Li