Browse Source

Increase the unix message receiving capacity

master
Con Kolivas 9 years ago
parent
commit
2d167171ad
  1. 2
      src/libckpool.c
  2. 8
      src/stratifier.c

2
src/libckpool.c

@ -834,7 +834,7 @@ int _open_unix_server(const char *server_path, const char *file, const char *fun
if (unlikely(ret < 0))
LOGERR("Failed to set mode in open_unix_server - continuing");
ret = listen(sockd, 10);
ret = listen(sockd, SOMAXCONN);
if (unlikely(ret < 0)) {
LOGERR("Failed to listen to socket in open_unix_server");
close_unix_socket(sockd, server_path);

8
src/stratifier.c

@ -6580,14 +6580,10 @@ int stratifier(proc_instance_t *pi)
mutex_init(&sdata->ckdb_lock);
mutex_init(&sdata->ckdb_msg_lock);
/* Create half as many share processing threads as there are CPUs */
/* Create half as many share processing and receiving threads as there
* are CPUs */
threads = sysconf(_SC_NPROCESSORS_ONLN) / 2 ? : 1;
sdata->sshareq = create_ckmsgqs(ckp, "sprocessor", &sshare_process, threads);
/* Create 1/4 as many stratum processing threads as there are CPUs */
if (ckp->node)
threads = 1;
else
threads = threads / 2 ? : 1;
sdata->ssends = create_ckmsgq(ckp, "ssender", &ssend_process);
sdata->sauthq = create_ckmsgq(ckp, "authoriser", &sauth_process);
sdata->stxnq = create_ckmsgq(ckp, "stxnq", &send_transactions);

Loading…
Cancel
Save