Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
sds
margo
Commits
d49d5e00
Commit
d49d5e00
authored
Feb 23, 2018
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limit size of abt stack cache
- See
#40
parent
f16e0a0b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
margo.h
include/margo.h
+10
-0
margo.c
src/margo.c
+13
-0
No files found.
include/margo.h
View file @
d49d5e00
...
...
@@ -74,6 +74,16 @@ margo_instance_id margo_init(
* @param [in] handler_pool Argobots pool to service RPC handlers
* @param [in] hg_context Mercury context
* @returns margo instance id on success, MARGO_INSTANCE_NULL upon error
*
* NOTE: if you are configuring Argobots pools yourself before
* passing them into this function, please consider setting
* ABT_MEM_MAX_NUM_STACKS to a low value (like 8) either in your
* environment or programmatically with putenv() in your code before
* creating the pools to prevent excess memory consumption under
* load from producer/consumer patterns across execution streams that
* fail to utilize per-execution stream stack caches. See
* https://xgitlab.cels.anl.gov/sds/margo/issues/40 for details.
* The margo_init() function does this automatically.
*/
margo_instance_id
margo_init_pool
(
ABT_pool
progress_pool
,
...
...
src/margo.c
View file @
d49d5e00
...
...
@@ -9,6 +9,7 @@
#include <unistd.h>
#include <errno.h>
#include <abt.h>
#include <stdlib.h>
#include <margo-config.h>
#ifdef HAVE_ABT_SNOOZER
...
...
@@ -167,6 +168,18 @@ margo_instance_id margo_init(const char *addr_str, int mode,
if
(
mode
!=
MARGO_CLIENT_MODE
&&
mode
!=
MARGO_SERVER_MODE
)
goto
err
;
/* NOTE: Margo is very likely to create a single producer (the
* progress function), multiple consumer usage pattern that
* causes excess memory consumption in some versions of
* Argobots. See
* https://xgitlab.cels.anl.gov/sds/margo/issues/40 for details.
* We therefore manually set the ABT_MEM_MAX_NUM_STACKS parameter
* for Argobots to a low value so that RPC handler threads do not
* queue large numbers of stacks for reuse in per-ES data
* structures.
*/
putenv
(
"ABT_MEM_MAX_NUM_STACKS=8"
);
if
(
ABT_initialized
()
==
ABT_ERR_UNINITIALIZED
)
{
ret
=
ABT_init
(
0
,
NULL
);
/* XXX: argc/argv not currently used by ABT ... */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment