Skip to content

Commit 38e3936

Browse files
authored
Merge pull request #8293 from edgargabriel/topic/lustre-perf-fix
Topic/lustre perf fix
2 parents d36977c + 56dbd09 commit 38e3936

File tree

11 files changed

+535
-150
lines changed

11 files changed

+535
-150
lines changed

ompi/mca/common/ompio/common_ompio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#define OMPIO_LOCK_NEVER 0x00000100
6868
#define OMPIO_LOCK_NOT_THIS_OP 0x00000200
6969
#define OMPIO_DATAREP_NATIVE 0x00000400
70+
#define OMPIO_COLLECTIVE_OP 0x00000800
7071

7172
#define OMPIO_ROOT 0
7273

ompi/mca/fbtl/posix/fbtl_posix.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2018 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2020 University of Houston. All rights reserved.
1313
* Copyright (c) 2018 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* $COPYRIGHT$
@@ -29,6 +29,11 @@
2929
#include "ompi/mca/common/ompio/common_ompio_request.h"
3030

3131
extern int mca_fbtl_posix_priority;
32+
extern bool mca_fbtl_posix_read_datasieving;
33+
extern bool mca_fbtl_posix_write_datasieving;
34+
extern size_t mca_fbtl_posix_max_block_size;
35+
extern size_t mca_fbtl_posix_max_gap_size;
36+
extern size_t mca_fbtl_posix_max_tmpbuf_size;
3237

3338
BEGIN_C_DECLS
3439

ompi/mca/fbtl/posix/fbtl_posix_component.c

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2008-2018 University of Houston. All rights reserved.
13+
* Copyright (c) 2008-2020 University of Houston. All rights reserved.
1414
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
@@ -37,6 +37,15 @@ const char *mca_fbtl_posix_component_version_string =
3737
"OMPI/MPI posix FBTL MCA component version " OMPI_VERSION;
3838

3939
int mca_fbtl_posix_priority = 10;
40+
bool mca_fbtl_posix_read_datasieving = true;
41+
bool mca_fbtl_posix_write_datasieving = true;
42+
size_t mca_fbtl_posix_max_block_size = 1048576; // 1MB
43+
size_t mca_fbtl_posix_max_gap_size = 4096; // Size of a block in many linux fs
44+
size_t mca_fbtl_posix_max_tmpbuf_size = 67108864; // 64 MB
45+
/*
46+
* Private functions
47+
*/
48+
static int register_component(void);
4049

4150
/*
4251
* Instantiate the public struct with all of our public information
@@ -54,6 +63,7 @@ mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_component = {
5463
.mca_component_name = "posix",
5564
MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
5665
OMPI_RELEASE_VERSION),
66+
.mca_register_component_params = register_component,
5767
},
5868
.fbtlm_data = {
5969
/* This component is checkpointable */
@@ -63,3 +73,62 @@ mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_component = {
6373
.fbtlm_file_query = mca_fbtl_posix_component_file_query, /* get priority and actions */
6474
.fbtlm_file_unquery = mca_fbtl_posix_component_file_unquery, /* undo what was done by previous function */
6575
};
76+
77+
static int register_component(void)
78+
{
79+
mca_fbtl_posix_priority = 10;
80+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
81+
"priority", "Priority of the fbtl posix component",
82+
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
83+
OPAL_INFO_LVL_9,
84+
MCA_BASE_VAR_SCOPE_READONLY,
85+
&mca_fbtl_posix_priority);
86+
87+
mca_fbtl_posix_max_block_size = 1048576;
88+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
89+
"max_block_size", "Maximum average size in bytes of a data block in an iovec for data sieving. "
90+
"An average block size larger than this parameter will disable data sieving. Default: 1048576 bytes.",
91+
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0,
92+
OPAL_INFO_LVL_9,
93+
MCA_BASE_VAR_SCOPE_READONLY,
94+
&mca_fbtl_posix_max_block_size );
95+
96+
mca_fbtl_posix_max_gap_size = 4096;
97+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
98+
"max_gap_size", "Maximum average gap size between two blocks in an iovec for data sieving. "
99+
"An average gap size larger than this parameter will disable data sieving. Default: 4096 bytes. " ,
100+
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0,
101+
OPAL_INFO_LVL_9,
102+
MCA_BASE_VAR_SCOPE_READONLY,
103+
&mca_fbtl_posix_max_gap_size );
104+
105+
mca_fbtl_posix_max_tmpbuf_size = 67108864;
106+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
107+
"max_tmpbuf_size", "Maximum size of the temporary buffer used for data sieving in bytes. "
108+
"Default: 67108864 (64MB). " ,
109+
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0,
110+
OPAL_INFO_LVL_9,
111+
MCA_BASE_VAR_SCOPE_READONLY,
112+
&mca_fbtl_posix_max_tmpbuf_size );
113+
114+
mca_fbtl_posix_read_datasieving = true;
115+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
116+
"read_datasieving", "Parameter indicating whether to perform data sieving for read operations. "
117+
"Default: true.",
118+
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
119+
OPAL_INFO_LVL_9,
120+
MCA_BASE_VAR_SCOPE_READONLY,
121+
&mca_fbtl_posix_read_datasieving );
122+
123+
mca_fbtl_posix_write_datasieving = true;
124+
(void) mca_base_component_var_register(&mca_fbtl_posix_component.fbtlm_version,
125+
"write_datasieving", "Parameter indicating whether to perform data sieving for write operations. "
126+
"Default: true.",
127+
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
128+
OPAL_INFO_LVL_9,
129+
MCA_BASE_VAR_SCOPE_READONLY,
130+
&mca_fbtl_posix_write_datasieving );
131+
132+
133+
return OMPI_SUCCESS;
134+
}

0 commit comments

Comments
 (0)