Skip to content

Commit

Permalink
Up rlimits
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Feb 1, 2020
1 parent 667923f commit 6a8c508
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/smoker
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ local $SIG{TERM} = $SIG{INT} = $SIG{HUP} = sub {
# 'docker run -m 1g'
# This doesn't work on Cygwin or Windows
if(($^O ne 'cygwin') && ($^O ne 'MSWin32')) {
setrlimit(RLIMIT_DATA, 256 * 1024 * 1024, 512 * 1024 * 1024) or
setrlimit(RLIMIT_DATA, 512 * 1024 * 1024, 512 * 1024 * 1024) or
warn('Can\'t limit the data size - watch for memory usage');

if($Config{'osname'} ne 'solaris') {
setrlimit(RLIMIT_RSS, 32 * 1024 * 1024, 64 * 1024 * 1024) or
setrlimit(RLIMIT_RSS, 512 * 1024 * 1024, 64 * 1024 * 1024) or
warn('Can\'t limit the data size - watch for memory usage');
# Big enough for the Metadata file
setrlimit(RLIMIT_FSIZE, 40 * 1024 * 1024, 10 * 1024 * 1024);
Expand Down
4 changes: 2 additions & 2 deletions bin/smokerdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ clean($clean_after_test);
# 'docker run -m 1g'
# This doesn't work on Cygwin or Windows
if(($^O ne 'cygwin') && ($^O ne 'MSWin32')) {
setrlimit(RLIMIT_DATA, 128 * 1024 * 1024, 256 * 1024 * 1024) or
setrlimit(RLIMIT_DATA, 512 * 1024 * 1024, 256 * 1024 * 1024) or
warn('Can\'t limit the data size - watch for memory usage');

if($^O ne 'solaris') {
setrlimit(RLIMIT_RSS, 128 * 1024 * 1024, 256 * 1024 * 1024) or
setrlimit(RLIMIT_RSS, 512 * 1024 * 1024, 256 * 1024 * 1024) or
warn('Can\'t limit the data size - watch for memory usage');

# Big enough for the Metadata file
Expand Down

0 comments on commit 6a8c508

Please sign in to comment.