From d67947e3fea16423cb42e6fa550450d6f22f4756 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 4 Jun 2023 04:44:47 +0700 Subject: 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. --- lib/net/poll.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- cgit v1.3