← Back to team overview

desktop-packages team mailing list archive

[Bug 1430620] Re: gnome-terminal writes excessively to /tmp (affecting SSD drives)

 

If it was for me, I probably would have dropped infinite scrollback
support. But apparently some people find it really useful.

We already have a certain code. It was designed with multiple criteria
in mind, including infinite scrollback support, efficient storing on
disk, compression, encryption and so on - storing in memory wasn't
really among these. Tons of code have been built up around these
assumptions.

The main question is not how/why we got here, but how to move on from
here without reimplementing everything from scratch in a totally
different way (and also: why move on at all). I mean re-writing a huge
amount of code is also a possibility, but given the current resources
for vte development it's unlikely to happen in the foreseeable future.
We should accept where we are and find the simplest way to extend that
to keep the data in memory. As I stated in the upstream bug, I believe
the brand new memfd support of Linux seems to be the easiest way. (Or,
as a quick workaround, you can already make it store the scrollback
under a tmpfs-mounted directory. That's pretty much what memfd would
give you, without requiring a tmpfs mount point.)

>  Why turn things so far upside down to support an edge case (infinite
scrollback left open for long periods of time)?

I can't see why the time should matter here.

We either properly support infinite scrollback (not as an edge case;
without risking heavy swapping and OOM), or we don't. If we do, its
scrollback has to reside on disk. I hope this is clear so far. The
decision was made: we do support it. Most of the scrollback code was
written with this decision in mind.

Have you installed newest vte with the patch I attached, or any other
means of measuring its write activity? I really do want to see numbers
before we move on. The numbers so far still give me an impression that
even for extremely heavy terminal users gnome-terminal would still be
responsible for probably less than 1%/year of SSD wear-out. I'm waiting
for counter-proofs. (Could you please also describe in words what's your
average terminal activity like? E.g. do you have tasks running in the
background that continuously produce data, do you run big compilations
that print a lot, etc.?)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to vte in Ubuntu.
https://bugs.launchpad.net/bugs/1430620

Title:
  gnome-terminal writes excessively to /tmp (affecting SSD drives)

Status in vte package in Ubuntu:
  New

Bug description:
  1) In a gnome-terminal run "sudo fatrace -f W -t" (filter for writes plus timestamps).
  2) In another window cat a file to the screen.
  3) Observe the activity.  I see large churn on the /tmp partitition:

  20:41:24.158837 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.158837 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.159268 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.159268 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.159674 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.159674 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.160171 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.160171 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.160603 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.160603 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.160919 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.160919 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.161093 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.161093 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.161545 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.161545 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.161999 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.161999 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.162447 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.162447 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.162825 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.162825 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.162899 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.162899 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.163366 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.163366 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.163817 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.163817 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.164331 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.164331 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.164729 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.164729 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.164729 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.164729 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.165219 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.165219 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.165674 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.165674 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.166128 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.166128 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.166587 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.166587 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.166660 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.166660 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.167056 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.167056 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.167529 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.167529 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.167949 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.167949 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.168451 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.168451 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.168524 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.168524 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.168889 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.168889 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.169364 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.169364 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.169808 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.169808 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.170281 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.170281 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.170354 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.170354 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.170744 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.170744 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.171222 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.171222 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.171699 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.171699 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.172114 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.172114 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.172298 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.172298 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.172617 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.172617 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173055 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173055 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173528 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173528 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173997 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.173997 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.174286 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.174286 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.174470 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.174470 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.174908 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.174908 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.175387 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.175387 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.175808 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.175808 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.176240 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.176240 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.176240 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.176240 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.176752 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.176752 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.177217 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.177217 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.177659 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.177659 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.178119 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.178119 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.178119 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.178119 gnome-terminal(23352): W /tmp/#132835 (deleted)
  20:41:24.178584 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.178584 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.179053 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.179053 gnome-terminal(23352): W /tmp/#132828 (deleted)
  20:41:24.184620 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:41:24.184620 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:41:24.196022 gnome-terminal(23352): W /tmp/#132753 (deleted)
  20:41:24.196022 gnome-terminal(23352): W /tmp/#132753 (deleted)
  20:41:24.196022 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:41:24.196022 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:41:24.196503 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:41:24.196503 gnome-terminal(23352): W /tmp/#132355 (deleted)

  Related, but not the same:
  https://bugs.launchpad.net/ubuntu/+source/vte/+bug/865082?comments=all

  The excessive churn eventually gets flushed to disk, affecting the
  lifetime of SSD drives.

  
  Normal gnome terminal operation (no cat) results in endless streams of:
  20:44:25.107540 gnome-terminal(23352): RW /tmp/#132355 (deleted)
  20:44:25.138015 gnome-terminal(23352): RW /tmp/#132753 (deleted)
  20:44:25.138015 gnome-terminal(23352): W /tmp/#132753 (deleted)
  20:44:25.138108 gnome-terminal(23352): W /tmp/#132355 (deleted)
  20:44:25.138108 gnome-terminal(23352): RW /tmp/#132355 (deleted)
  20:44:25.168764 gnome-terminal(23352): RW /tmp/#132355 (deleted)
  20:44:25.168764 gnome-terminal(23352): RW /tmp/#132753 (deleted)
  20:44:25.168764 gnome-terminal(23352): W /tmp/#132753 (deleted)
  20:44:25.168764 gnome-terminal(23352): W /tmp/#132355 (deleted)

  
  132753 is NOT the process number of the gnome-terminal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vte/+bug/1430620/+subscriptions


References