Skip to content

Commit

Permalink
Change --ponyminthreads default to 0
Browse files Browse the repository at this point in the history
Thanks to @slfritchie's hard work in ponylang#2926 and ponylang#2561 to find and
fix the bugs in the dynamic scheduler scaling logic, scheduler
thread 0 now also suspends and resumes correctly without issues
(in my testing).

This commit changes the default for `--ponyminthreads` from `1` to
`0`. The last time @slfritchie ran into issues was in March and
left a comment with the commands he used at:
ponylang#2561 (comment)

I ran the commands from @slfritchie's comment (with minor changes
to ensure `--ponyminthreads=0`) using Pony 0.26.0 for a few hours
without any issues.
  • Loading branch information
dipinhora committed Feb 23, 2019
1 parent 66c3947 commit c7db962
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/libponyc/options/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ static void usage(void)
" --ponythreads Use N scheduler threads. Defaults to the number of\n"
" cores (not hyperthreads) available.\n"
" --ponyminthreads Minimum number of active scheduler threads allowed.\n"
" Defaults to 1. Use of 0 is considered experimental\n"
" and may cause improper scheduler behavior.\n"
" Defaults to 0.\n"
" --ponysuspendthreshold\n"
" Amount of idle time before a scheduler thread suspends\n"
" itself to minimize resource consumption (max 1000 ms,\n"
Expand Down
2 changes: 1 addition & 1 deletion src/libponyrt/sched/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ PONY_API int pony_init(int argc, char** argv)
memset(&opt, 0, sizeof(options_t));

// Defaults.
opt.min_threads = 1;
opt.min_threads = 0;
opt.cd_detect_interval = 100;
opt.gc_initial = 14;
opt.gc_factor = 2.0f;
Expand Down

0 comments on commit c7db962

Please sign in to comment.