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

More examples / documentation on Photon Filesystem #135

Open
aley1 opened this issue May 6, 2023 · 3 comments
Open

More examples / documentation on Photon Filesystem #135

aley1 opened this issue May 6, 2023 · 3 comments
Labels
Documentation Improvements or additions to documentation

Comments

@aley1
Copy link

aley1 commented May 6, 2023

Hi,
Besides the example on how to init, open and write to a iFile in /tree/main/examples/simple, will there be more examples/documentation provided Photon filesystem? With info on the type of settings (for tuning), read/write APIs
I am hoping to test writing and reading sequential files using Photon with io_uring IO Direct, and see how much performance benefit it provides over standard linux fio.

@beef9999
Copy link
Collaborator

beef9999 commented May 6, 2023

You may want to upgrade the kernel to 5.17 above to test io_uring, for the best performance.

There are some test code in io/test/test-iouring.cpp. But unfortunately, no detailed docs at present...

class IFileSystem is the abstraction of the fs and IFile is for file. They are all POSIX-like.

For simple case, you can use the photon::fs::open_localfile_adaptor to open a file directly, and let io_engine_type = ioengine_iouring.

For complex case, you may create a fs first, then open a file from that fs.

@beef9999
Copy link
Collaborator

beef9999 commented May 6, 2023

You may refer to the do_io_test function in io/test/test-iouring.cpp

@beef9999
Copy link
Collaborator

beef9999 commented May 6, 2023

ALso open with O_DIRECT flag

Even though I don't think direct read/write a file (instead of block) is a brilliant idea.

The advantage of io_uring is that it can use page cache.

@beef9999 beef9999 added the Documentation Improvements or additions to documentation label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants