-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qemu-img create via libfapi is slow #4320
Comments
GFAPI based command ( Please share the gfapi logs so that we can confirm the timings for each steps. |
Thank you, I increased diagnostics.client-log-level to DEBUG. |
Can you share the profile after execute a command like below
|
GFAPI doesn't help for the stateless operations like create. When the image is booted using Fuse equivalent to the GFAPI code above is # qemu_fuse_create.sh
mount -t glisters cloud15-gl.na.infn.it:vstor /mnt/pve/vstor
qemu-img create /mnt/pve/vstor/10G 10G
umount /mnt/pve/vstor
|
The actual image creation via gfapi is fast as we can see the connection was started around 12:47:24.708074 and shutdown
|
@aravindavk I tried what you suggest
Execution is almost istantaneous:
|
I think i have found a RCA why qemu-img is taking time during connection shutdown. @rafikc30 |
During the first rpc clnt submission we take the rpc reference and register the call_bail function for the timer thread. The timer thread call call_bail function every 10s basis. In case if a client trigger a shutdown request it try to call rpc_clnt_connection_cleanup to cleanup the rpc connection.The rpc_clnt_connection would not be able to cleanup the rpc connection successfully due to the cleanup_started flag being set by the upper xlator. The rpc reference will be unref only after trigger a call_bail function so basically if somehow call_bail is triggered just before start a shutdown process the application has to wait for 10s to cleanup the rpc connection eventually the process becomes slow. Solution: Unref the rpc object based on the conn->timer/conn->reconnect pointer value as we are doing the same for ping_timer. These pointer are always modified under the critical section so we can assume if pointer is valid it means rpc reference is also valid. Fixes: gluster#4320 Change-Id: Ib947b8bfcbe1b49e1ed05a50a84de6f92afbca13 Signed-off-by: Mohit Agrawal <[email protected]>
During the first rpc clnt submission we take the rpc reference and register the call_bail function for the timer thread. The timer thread call call_bail function every 10s basis. In case if a client trigger a shutdown request it try to call rpc_clnt_connection_cleanup to cleanup the rpc connection.The rpc_clnt_connection would not be able to cleanup the rpc connection successfully due to the cleanup_started flag being set by the upper xlator. The rpc reference will be unref only after trigger a call_bail function so basically if somehow call_bail is triggered just before start a shutdown process the application has to wait for 10s to cleanup the rpc connection eventually the process becomes slow. Solution: Unref the rpc object based on the conn->timer/conn->reconnect pointer value as we are doing the same for ping_timer. These pointer are always modified under the critical section so we can assume if pointer is valid it means rpc reference is also valid. Fixes: gluster#4320 credits: Xavi Hernandez <[email protected]> Change-Id: Ib947b8bfcbe1b49e1ed05a50a84de6f92afbca13 Signed-off-by: Mohit Agrawal <[email protected]>
During the first rpc clnt submission we take the rpc reference and register the call_bail function for the timer thread. The timer thread call call_bail function every 10s basis. In case if a client trigger a shutdown request it try to call rpc_clnt_connection_cleanup to cleanup the rpc connection.The rpc_clnt_connection would not be able to cleanup the rpc connection successfully due to the cleanup_started flag being set by the upper xlator. The rpc reference will be unref only after trigger a call_bail function so basically if somehow call_bail is triggered just before start a shutdown process the application has to wait for 10s to cleanup the rpc connection eventually the process becomes slow. Solution: Unref the rpc object based on the conn->timer/conn->reconnect pointer value as we are doing the same for ping_timer. These pointer are always modified under the critical section so we can assume if pointer is valid it means rpc reference is also valid. Fixes: gluster#4320 credits: Xavi Hernandez <[email protected]> Change-Id: Ib947b8bfcbe1b49e1ed05a50a84de6f92afbca13 Signed-off-by: Mohit Agrawal <[email protected]>
During the first rpc clnt submission we take the rpc reference and register the call_bail function for the timer thread. The timer thread call call_bail function every 10s basis. In case if a client trigger a shutdown request it try to call rpc_clnt_connection_cleanup to cleanup the rpc connection.The rpc_clnt_connection would not be able to cleanup the rpc connection successfully due to the cleanup_started flag being set by the upper xlator. The rpc reference will be unref only after trigger a call_bail function so basically if somehow call_bail is triggered just before start a shutdown process the application has to wait for 10s to cleanup the rpc connection eventually the process becomes slow. Solution: Unref the rpc object based on the conn->timer/conn->reconnect pointer value as we are doing the same for ping_timer. These pointer are always modified under the critical section so we can assume if pointer is valid it means rpc reference is also valid. Fixes: gluster#4320 credits: Xavi Hernandez <[email protected]> Change-Id: Ib947b8bfcbe1b49e1ed05a50a84de6f92afbca13 Signed-off-by: Mohit Agrawal <[email protected]>
Description of problem:
Creating a raw/qcow2 on a gluster volume via libgfapi appears to be very slow compare to fuse access.
If I do the same operation directly on the fuse mount point, the operation is almost istantaneous:
Showing both files:
Mandatory info:
- The output of the
gluster volume info
command:- The output of the
gluster volume status
command:Additional info:
- The operating system / glusterfs version:
Debian 12.5
Glusterfs 11.1
Bricks are on ZFS file sytems:
The text was updated successfully, but these errors were encountered: