diff options
| author | Shulhan <ms@kilabit.info> | 2023-06-04 04:44:47 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-06-04 04:53:38 +0700 |
| commit | d67947e3fea16423cb42e6fa550450d6f22f4756 (patch) | |
| tree | f68efe69891bbdef72f9b8713b736da5871a22b0 | |
| parent | 690c4dafbc06ff5d045b32780e7b1c8b9587892a (diff) | |
| download | pakakeh.go-d67947e3fea16423cb42e6fa550450d6f22f4756.tar.xz | |
lib/net: increase the maximum poll events
The maxQueue define the number of events that can be read from poll at
one time.
Using 128 seems to small for high throughput networks.
Increasing this number also increase the memory consumed by process.
Maybe later we can export this function as option when creating poll.
| -rw-r--r-- | lib/net/poll.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/net/poll.go b/lib/net/poll.go index 020f2b0b..035672e0 100644 --- a/lib/net/poll.go +++ b/lib/net/poll.go @@ -5,7 +5,11 @@ package net const ( - maxQueue = 128 + // maxQueue define the number of events that can be read from poll at + // one time. + // Increasing this number also increase the memory consumed by + // process. + maxQueue = 2048 ) // Poll represent an interface to network polling. |
