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

Too many file access using the Python interfacte #45

Open
qezlou opened this issue Jul 26, 2024 · 3 comments
Open

Too many file access using the Python interfacte #45

qezlou opened this issue Jul 26, 2024 · 3 comments

Comments

@qezlou
Copy link

qezlou commented Jul 26, 2024

@rainwoodman

Hi Yu,
Admins on TACC have raised an issue with our code using thebigfile python interface. Apparently, it invokes too many queries to the filesystem, similar to your comment on README file:

The Python binding under MPI invoked more meta-data queries to the file system than we would like to be, though for small scale applications (thousands of cores) it is usually adequate

Not quite sure if this #43 fixes this though, since my issue is with reading not writing files.

Any starter clues, like which source file I need to dive into to fix this?

@qezlou
Copy link
Author

qezlou commented Aug 16, 2024

After a bit of digging in the code:

  1. Remove the MPI_Barrier after big_file_mpi_close #43 doesn't fix the issue we have here which is over-accessing file during file read
  2. The python wrapper for open() and Dataset() don't use the MPI routines implemented for C (crc/bigfile-mpi.c) instead invoke the serial version, i.e. src/bigfile.c. It is already mentioned in the poster [https://github.com/rainwoodman/bigfile/tree/documents] that

Python binding is based on the Non-MPI API, with its own MPI interface;

However, in contrary to the C-MPI, python wrapper opens the file on all processes for read. After a dataset is indexed, the flow is :

Dataset() in bigfile.__init__.py ---> Dataset.read() in pyxbigfile.pyx ---> big_file_read_records() in src/bigfile.h and not the MPI version , big_file_mpi_read_records in src/bigile-mpi.h.

This might be why the I/O is overwhelmed with large number of processes. I am planning to try mpi4py.File.Open and Read() and check the I/O.

@sbird
Copy link
Member

sbird commented Aug 16, 2024

Yup, that would do it!

@rainwoodman
Copy link
Collaborator

rainwoodman commented Aug 17, 2024 via email

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

3 participants