Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

configuration: one worker per cpu by default. #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ stud_config * config_new (void) {
r->BACK_IP = strdup("127.0.0.1");
r->BACK_PORT = strdup("8000");
r->NCORES = 1;
#ifdef _SC_NPROCESSORS_ONLN
r->NCORES = sysconf(_SC_NPROCESSORS_ONLN);
#endif
r->CERT_FILES = NULL;
r->CIPHER_SUITE = NULL;
r->ENGINE = NULL;
Expand Down
2 changes: 1 addition & 1 deletion stud.8
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sent to the backend defined above.
.It Fl n Ar cores
Use
.Ar cores
worker processes. Default is 1.
worker processes. Default is the number of CPUs the host has.
.It Fl B Ar backlog
Set listen backlog size. Default is 100.
.It Fl C Ar cache
Expand Down