LiTWol @ Oleg Terenchuk

  • Contact
  • Tips & Tricks
  • About me

User login

  • Request new password
To prevent automated spam submissions leave this field empty.

litwol's tweets

  • Failure is a success at ruling out an incorrect option — 2 years 41 weeks ago
  •  
  • 1 of 9
  • ››
more
Home

(gnu) screen defscrollback memory hog

Submitted by litwol on Sun, 11/20/2011 - 19:22

Screen configuration variable defscrollback controls the length of scrollback for all newly created windows ("def" for default i imagine).

Take care not to set this value too large as screen seems to maintain scrollback entirely in ram. I found out the hard way after setting defscrollback 1000000 which made screen consume over 300MB ram out of maximum 512MB on my VPS.

If you really need to have so much backscroll, consider using screen's logging to file functionality.

excerpt from "man screen":

COMMAND-LINE OPTIONS
       -L   tells screen to turn on automatic output logging for the windows.

DEFAULT KEY BINDINGS
       C-a H       (log)         Begins/ends logging of the current window to the file "screenlog.n".

Tags:
  • screen
  • tips

2 reponses to "(gnu) screen defscrollback memory hog"

1. Decreasing the memory usage of GNU screen

Submitted by Anonymous on Wed, 12/07/2011 - 12:04.

Nice info, thanks. I had a doubt, say once I have given huge scrollback to each window, and my screen is taking up lot of memory, is there a way to reduce the RAM usage, I tried setting up scrollback buffer of each window to 0, but that did not decrease the memory usage at all, Is there a way to do that ?

  • reply

2. Make sure you change

Submitted by litwol on Sat, 12/10/2011 - 07:27.

Make sure you change "scrollback" value for every open screen window, otherwise all open windows will still use the previous large scrollback number.

you can either make every window active at a time and manually set low scrollback number using "CTRL-a :scrollback ###", or set scrollback number in .screenrc and then "CTRL-a :source .screenrc" (i did not check that last method, let me know if it works).

  • reply

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <br>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options

To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

LiTWoL © Oleg Terenchuk - Hosted on Linode.com 512