Skip to content

Commit 0aa3049

Browse files
committed
Performance tuning: change the default behavior of ompio to *not* segment individual read/write operations.
In most cases, performance seems to be better if not segmented.
1 parent db5af26 commit 0aa3049

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

ompi/mca/io/ompio/io_ompio_component.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "ompi/mca/io/io.h"
3232
#include "io_ompio.h"
3333

34-
int mca_io_ompio_cycle_buffer_size = OMPIO_PREALLOC_MAX_BUF_SIZE;
34+
int mca_io_ompio_cycle_buffer_size = -1;
3535
int mca_io_ompio_bytes_per_agg = OMPIO_PREALLOC_MAX_BUF_SIZE;
3636
int mca_io_ompio_num_aggregators = -1;
3737
int mca_io_ompio_record_offset_info = 0;
@@ -162,10 +162,10 @@ static int register_component(void)
162162
MCA_BASE_VAR_SCOPE_READONLY,
163163
&mca_io_ompio_coll_timing_info);
164164

165-
mca_io_ompio_cycle_buffer_size = OMPIO_PREALLOC_MAX_BUF_SIZE;
165+
mca_io_ompio_cycle_buffer_size = -1;
166166
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
167167
"cycle_buffer_size",
168-
"Cycle buffer size of individual reads/writes",
168+
"Data size issued by individual reads/writes per call",
169169
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
170170
OPAL_INFO_LVL_9,
171171
MCA_BASE_VAR_SCOPE_READONLY,

ompi/mca/io/ompio/io_ompio_file_read.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,12 @@ int ompio_io_ompio_file_read (mca_io_ompio_file_t *fh,
106106
&decoded_iov,
107107
&iov_count);
108108

109-
bytes_per_cycle = mca_io_ompio_cycle_buffer_size;
109+
if ( -1 == mca_io_ompio_cycle_buffer_size ) {
110+
bytes_per_cycle = max_data;
111+
}
112+
else {
113+
bytes_per_cycle = mca_io_ompio_cycle_buffer_size;
114+
}
110115
cycles = ceil((float)max_data/bytes_per_cycle);
111116

112117
#if 0

ompi/mca/io/ompio/io_ompio_file_write.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ int ompio_io_ompio_file_write (mca_io_ompio_file_t *fh,
103103
&decoded_iov,
104104
&iov_count);
105105

106-
bytes_per_cycle = mca_io_ompio_cycle_buffer_size;
106+
if ( -1 == mca_io_ompio_cycle_buffer_size ) {
107+
bytes_per_cycle = max_data;
108+
}
109+
else {
110+
bytes_per_cycle = mca_io_ompio_cycle_buffer_size;
111+
}
107112
cycles = ceil((float)max_data/bytes_per_cycle);
108113

109114
#if 0

0 commit comments

Comments
 (0)