Galène videoconferencing server discussion list archives
 help / color / mirror / Atom feed
From: Juliusz Chroboczek <jch@irif.fr>
To: Dirk-Willem van Gulik <dirkx@webweaving.org>
Cc: galene@lists.galene.org
Subject: [Galene] Re: Greedy Galene :) -- file descriptors
Date: Wed, 15 Jan 2025 14:51:27 +0100	[thread overview]
Message-ID: <87plkouqw0.wl-jch@irif.fr> (raw)
In-Reply-To: <0D36F069-3962-466B-A13D-C900BE406D1A@webweaving.org>

> Galene needs a relatively large number of file descriptors (and will
> complain in the log about the current, 13k, limit*.

Yes, we use a distinct socket for every WebRTC peer connection, plus one
for every WebSocket, and another bunch for NAT probing.  I'm planning to
reduce that at some point, but the functionality will remain optional
unless I can show it doesn't harm performance.

> Now I did notice that galene has a value check for 65k:
> 
> 	https://github.com/jech/galene/blob/c465157eb5e31405daf3f33b8456e8c89aa51430/galene.go#L110
> 
> What is the reason for this ? What is a `normal' number for say up to
> a 1000 users ?n

File descriptors are cheap (they cost a few hundred bytes each, including
the associated i-node).  The 1024 limit is a historical artefact, due to
limitations of the select system call on older BSD systems.

I recommend that you just set the limit to 64k and never think about it
again.  At worst, it will allow an attacker to use up a few tens of kB of
kernel memory.

-- Juliusz

      reply	other threads:[~2025-01-15 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 13:39 [Galene] " Dirk-Willem van Gulik
2025-01-15 13:51 ` Juliusz Chroboczek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87plkouqw0.wl-jch@irif.fr \
    --to=jch@irif.fr \
    --cc=dirkx@webweaving.org \
    --cc=galene@lists.galene.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox