Skip to content
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

Documentation of the API functions #49

Open
derekbit opened this issue Mar 2, 2023 · 5 comments
Open

Documentation of the API functions #49

derekbit opened this issue Mar 2, 2023 · 5 comments

Comments

@derekbit
Copy link

derekbit commented Mar 2, 2023

I am developing a userspace block device as an alternative solution to iSCSI block device in the Longhorn project. Based on preliminary performance evaluations, it appears that our userspace block device (longhorn-ublk) has the potential to improve the performance of Longhorn significantly.

It would be beneficial for the ubdsrv project to offer well-documented API documentation similar to http://libfuse.github.io/doxygen. This would provide users with a clear understanding of how to utilize the ubdsrv API, making it easier to develop customized block devices that integrate with it.

Thanks for the awesome project.

@ming1
Copy link
Collaborator

ming1 commented Mar 2, 2023

I am developing a userspace block device as an alternative solution to iSCSI block device in the Longhorn project. Based on preliminary performance evaluations, it appears that our userspace block device, or "ublk," has the potential to improve the performance of Longhorn significantly.

That is great!

It would be beneficial for the ubdsrv project to offer well-documented API documentation similar to http://libfuse.github.io/doxygen. This would provide users with a clear understanding of how to utilize the ubdsrv API, making it easier to develop customized block devices that integrate with it.

OK, got it. I know ublk document could be one problem for users,
and will improve it.

Thanks,
Ming

ming1 added a commit that referenced this issue Mar 15, 2023
Add doxygen config file, and prepare for documenting libublksrv data
structure and interface.

For addressing issue #49.

doxgen doc can be generated by running 'make doxygen_doc', and the
generated docs are in doc/html.

Todo: integrate doxygen with autoconf more gracefully.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
ming1 added a commit that referenced this issue Mar 15, 2023
Add doxygen config file, and prepare for documenting libublksrv data
structure and interface.

For addressing issue #49.

doxgen doc can be generated by running 'make doxygen_doc', and the
generated docs are in doc/html.

Todo: integrate doxygen with autoconf more gracefully.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
@ming1
Copy link
Collaborator

ming1 commented Mar 15, 2023

I am developing a userspace block device as an alternative solution to iSCSI block device in the Longhorn project. Based on preliminary performance evaluations, it appears that our userspace block device (longhorn-ublk) has the potential to improve the performance of Longhorn significantly.

It would be beneficial for the ubdsrv project to offer well-documented API documentation similar to http://libfuse.github.io/doxygen. This would provide users with a clear understanding of how to utilize the ubdsrv API, making it easier to develop customized block devices that integrate with it.

Now doxygen style documentation for libublksrv API is supported by
commit 0747711

generate html doc in doc/html/

make doxygen_doc

Please try it and see if you are fine with it.

Thanks,

@derekbit
Copy link
Author

@ming1
Thank you! It loos good to me.

@derekbit
Copy link
Author

derekbit commented Mar 16, 2023

I am developing a userspace block device as an alternative solution to iSCSI block device in the Longhorn project. Based on preliminary performance evaluations, it appears that our userspace block device (longhorn-ublk) has the potential to improve the performance of Longhorn significantly.

FYR, the performance improvement in Longhorn (write iops is clamped by the Longhorn's internal datapath design).
The implementation actually follows the ublk-nbd.
image

One question raised when I was benchmarking it. When I increase the queue_depth to 63, the seq write iops decreases. Do you have any idea?

@ming1
Copy link
Collaborator

ming1 commented Mar 16, 2023

I am developing a userspace block device as an alternative solution to iSCSI block device in the Longhorn project. Based on preliminary performance evaluations, it appears that our userspace block device (longhorn-ublk) has the potential to improve the performance of Longhorn significantly.

FYR, the performance improvement in Longhorn (write iops is clamped by the Longhorn's internal datapath design). The implementation actually follows the ublk-nbd. image

cool! Nice job!

BTW, recently I am working on zero copy support, feel free to test it
and see if it improves bw for longhorn-ublk if you are interested in it:

https://lore.kernel.org/linux-block/ZBKTUtWTVdcTeUHD@ovpn-8-22.pek2.redhat.com/T/#m3427c77c10a49ad99f40354f9c4aeabcc5bf27cd

One question raised when I was benchmarking it. When I increase the queue_depth to 63, the seq write iops decreases. Do you have any idea?

  1. What is your ethernet link?
  • the bw of 1496821KiB/sec is ~11Gbps
  • I don't have such switch at hand
  1. what is the iops or bw difference between 63 qd and 31 qd?

  2. can you observe similar iops decrease on ublk-nbd after switching ot 63 qd from 31 qd? I can't observe such difference when running ublk-nbd inside
    my VM, which is over local tcp socket.

Also io_uring handles 'tcp send' one by one by IO_LINK, and increasing
qd could just make the whole tcp send chain becoming longer. I feel it
is related with io_uring implementation, and shouldn't be related with
net.

BTW, I am not familiar with iscsi protocol, so can't guess how iscsi
is implemented by io_uring.

Also just be curious, why don't you write one nvme-tcp over ublk,
which is supposed to be more fast than iscsi.

Thanks,
Ming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants