all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: Thomas Ellmenreich <t.ellmenreich@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Elias Huhsovitz <e.huhsovitz@proxmox.com>
Cc: pve-devel <pve-devel-bounces@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH container] add container console scrollback buffer
Date: Thu, 5 Nov 2026 15:57:56 +0100	[thread overview]
Message-ID: <72f14ab1-2440-49b2-8bfc-54d3093c2f88@proxmox.com> (raw)
In-Reply-To: <7788afcb-4ca0-4189-9fb9-001a6c9dad78@proxmox.com>

I ended up with a very different approach
while making use of `lxc.console.buffer.size`:

Superseded-by: https://lore.proxmox.com/pve-devel/20261105144947.124148-1-f.schauer@proxmox.com

On 28/09/2026 13:02, Filip Schauer wrote:
> The dtach patch alone would therefore grant us the scrollback as soon as
> the console has been opened for the first time.
> 
> To retain early boot diagnostics as well, the dtach master needs to be
> started when the container starts, rather than when the console is first
> opened in the web UI. This is why my patch starts a master process in
> src/PVE/LXC.pm:vm_start.
> 
> The drawback is that containers whose consoles are never opened will now
> also retain a dtach master process.
> I measured the memory overhead of different approaches:
> * Native C dtach: ~1.2 MB RSS
> * Perl dtach-scrollback-master: ~7 MB RSS
> 
> While 7 MB is lean for Perl, it adds up with each running container.
> 
> Regarding patching dtach directly: very recently a new pull request was
> created on GitHub that implements a configurable scrollback buffer along
> with some special handling for terminal escape sequences:
> https://github.com/crigler/dtach/pull/32
> 
> The problem is that we don't know when or if the PR will be merged
> upstream, and waiting for it to reach Debian could take a long time.
> 
> So I see a few options going forward:
> * Vendor dtach with PR #32 applied ourselves
> * Use the dtach-scrollback-master Perl implementation and accept the
>    memory overhead
> * Write our own lightweight dtach master in Rust to avoid having to
>    vendor dtach while keeping the memory footprint low
> 
> 
> 





      reply	other threads:[~2026-11-05 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 11:23 [pve-devel] [PATCH container] add container console scrollback buffer Filip Schauer
2026-09-25 11:00 ` Thomas Ellmenreich
2026-09-28 11:02   ` Filip Schauer
2026-11-05 14:57     ` Filip Schauer [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

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

  git send-email \
    --in-reply-to=72f14ab1-2440-49b2-8bfc-54d3093c2f88@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=e.huhsovitz@proxmox.com \
    --cc=pve-devel-bounces@lists.proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.ellmenreich@proxmox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal