You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output.csv file is currently opened during parameter parsing as side effect of the read_config() called by all ranks in the main() function of the core benchmarks in h5bench_patterns/. This leads to a degenerate performance scenario when Lustre striping is set to -1 (stripe across all OSTs) and ranks coordinate opening the output.csv. This causes observable coordination overhead at small ranks (64) and degrades rapidly with scale, easily leading to more than an hour of coordination overhead at just 512 ranks. This delays the start of the actual HDF5 write test until the file open coordination is complete. This can lead to unexpected job time overruns when exploring benchmark scenarios.
Note this does not appear to affect benchmark results. It just seriously degrades process runtime with what is assumed to be metadata operations related to the file open from all ranks. This has been tested with collective I/O, although the output.csv is reported as part of STDIO module accounting according to Darshan.
This configuration arises when setting the -1 Lustre stripe pattern for the HDF5 write tests by applying it to the storage directory specified in the .json config file. This approach ensures newly created HDF5 files have the desired stripe config. If the benchmark config doesn't take care to move the output.csv file to a location where this strip pattern is not active, the benchmark runtime grows due to file open overhead.
It seems reasonable to open the output.csv only for the rank that will write the file, currently rank 0. Because the file is opened during parameter parsing there is no information available about the rank of the process. This can be resolved by moving the csv_init() out of the _set_params() function in hbench_util.c and into the main() body of the benchmark runner, which knows the required function params and the process rank. This also gives ranks more control over when the file is opened. It is only written by rank 0 at the conclusion of all benchmark operations.
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${NUIO_INSTALL_DIR} \
-DWITH_ASYNC_VOL=ON \
-DCMAKE_C_FLAGS="-I$HDF5_DIR/include -L/$HDF5_DIR/lib"
make
make install
jprorama
changed the title
Opening CSV file in all ranks leads
Opening output.csv file in all ranks can lead to very high file open overhead
Sep 29, 2024
jprorama
added a commit
to jprorama/h5bench
that referenced
this issue
Oct 3, 2024
This avoids opening the file in all ranks, causing file open contention
between ranks. Contention increases with rank count and stripe count.
Proposed partial fix for hpc-io#131 for base write benchmarks.
Bug Report
The output.csv file is currently opened during parameter parsing as side effect of the read_config() called by all ranks in the main() function of the core benchmarks in
h5bench_patterns/
. This leads to a degenerate performance scenario when Lustre striping is set to -1 (stripe across all OSTs) and ranks coordinate opening theoutput.csv
. This causes observable coordination overhead at small ranks (64) and degrades rapidly with scale, easily leading to more than an hour of coordination overhead at just 512 ranks. This delays the start of the actual HDF5 write test until the file open coordination is complete. This can lead to unexpected job time overruns when exploring benchmark scenarios.Note this does not appear to affect benchmark results. It just seriously degrades process runtime with what is assumed to be metadata operations related to the file open from all ranks. This has been tested with collective I/O, although the output.csv is reported as part of STDIO module accounting according to Darshan.
This configuration arises when setting the -1 Lustre stripe pattern for the HDF5 write tests by applying it to the
storage
directory specified in the .json config file. This approach ensures newly created HDF5 files have the desired stripe config. If the benchmark config doesn't take care to move theoutput.csv
file to a location where this strip pattern is not active, the benchmark runtime grows due to file open overhead.It seems reasonable to open the output.csv only for the rank that will write the file, currently rank 0. Because the file is opened during parameter parsing there is no information available about the rank of the process. This can be resolved by moving the csv_init() out of the _set_params() function in hbench_util.c and into the main() body of the benchmark runner, which knows the required function params and the process rank. This also gives ranks more control over when the file is opened. It is only written by rank 0 at the conclusion of all benchmark operations.
To Reproduce
How are you building/running h5bench?
Running
I'm building h5bench on Polaris.
What is the input configuration file you use?
Expected Behavior
Opening log files should have low overhead.
Software Environment
Additional information
Add any other information about the problem here.
The text was updated successfully, but these errors were encountered: