While the data collection above is going on... here is a recap of the
previous X session (2020-07-05 thru 2020-08-10)

* Restarted X server with XFCE.
* Apps used almost all the time: mostly Firefox, MATE terminal
* Apps used sometimes: VLC, "xpra attach", geeqie
* Apps used rarely: libreoffice

I have collected a number of "ps fuxa" outputs which I distilled below
only to show the VSIZE and RSS for that Xorg xserver process:

~~~
2020-07-05 22:39:08     907048     88500
2020-07-05 22:42:24     950740    129288        libreoffice
2020-07-08 15:13:30    1199296    250108        libreoffice
2020-07-11 21:55:10    1227060    277484        libreoffice  (vlc started after 
this)
2020-07-13 12:16:53    1217636    271656        vlc
2020-07-15 12:40:25    1234728    293524        vlc
2020-07-17 23:24:01    1906196    940544        vlc(163655) (2GB mem usage, 
terminated)
2020-07-19 20:19:16    2217016   1046988        vlc(357305)
2020-07-20 13:09:06    2235980   1071448        vlc
2020-07-22 13:18:05    2296896    819008        vlc
2020-07-22 13:36:04    2292208    862640
2020-07-22 13:36:47    2259436    860288
2020-07-22 14:07:13    2201380    923184
2020-07-30 00:53:51    2257172   1153128
2020-08-02 20:57:49    2213628   1178836
2020-08-03 11:54:58    2250960   1182832        vlc(793990)
2020-08-08 10:35:37    2493120   1526196
~~~

Note: I also filed another bug originally against VLC--because where
you saw the large memory usage above, VLC also showed memory
explosion.

https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1888558

Since that time it was re-attributed to MESA driver.
Looking at the pattern above, there is a strong likelihood that
VLC/MESA is one of the culprits for large X memory consumption.

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

Title:
  Xorg server uses unacceptably large amounts of memory (and keep
  growing)

Status in xorg-server package in Ubuntu:
  Incomplete

Bug description:
  Description: Xorg server uses unacceptably large amounts of memory
  (and keep growing)

  Ever since I upgraded to Ubuntu 20.04 (with fresh install) on my
  laptop (Lenovo T450s, Intel Core i5-5200U, Intel HD5500 graphics), I
  have been troubled by the way Xorg process uses memory.

  Here is an example of memory usage of Xorg as a function of time. I
  rebooted the laptop on June 17:

      Xorg-usage-20200617a.txt:root        1224  1.9  0.8 948408 98848 tty7     
Rsl+ 10:38   0:05  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
      Xorg-usage-20200617b.txt:root        1224  2.2  0.8 978264 105180 tty7    
Ssl+ 10:38   0:22  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
      Xorg-usage-20200618a.txt:root        1224  0.3  1.3 1143064 162584 tty7   
Ssl+ Jun17   3:15  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
      Xorg-usage-20200619a.txt:root        1224  0.3  2.9 1432232 360700 tty7   
Ssl+ Jun17  12:30  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
      Xorg-usage-20200619b.txt:root        1224  0.3  2.7 1313120 338656 tty7   
Ssl+ Jun17  12:39  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
      Xorg-usage-20200623a.txt:root        1224  0.3  6.0 1944364 738596 tty7   
Ssl+ Jun17  31:55  \_ /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth 
/var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

  The filename indicates the date the "ps fuxa" command was run.
  Contrast this against the memory usage of another Xorg process run for XPRA:

      Xorg-usage-20200617b.txt:wirawan     4452  2.4  2.0 1106920 244984 ?      
Ssl  10:46   0:12  \_ /usr/lib/xorg/Xorg-for-Xpra-:100 -noreset -novtswitch 
-nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth 
/home/wirawan/.Xauthority -logfile /run/user/1000/xpra/Xorg.:100.log -configdir 
/run/user/1000/xpra/xorg.conf.d/4451 -config /etc/xpra/xorg.conf -depth 24 :100
      Xorg-usage-20200618a.txt:wirawan     4452  0.2  2.0 1108572 246616 ?      
Ssl  Jun17   2:25  \_ /usr/lib/xorg/Xorg-for-Xpra-:100 -noreset -novtswitch 
-nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth 
/home/wirawan/.Xauthority -logfile /run/user/1000/xpra/Xorg.:100.log -configdir 
/run/user/1000/xpra/xorg.conf.d/4451 -config /etc/xpra/xorg.conf -depth 24 :100
      Xorg-usage-20200619a.txt:wirawan     4452  0.2  2.0 1112460 249516 ?      
Ssl  Jun17   8:34  \_ /usr/lib/xorg/Xorg-for-Xpra-:100 -noreset -novtswitch 
-nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth 
/home/wirawan/.Xauthority -logfile /run/user/1000/xpra/Xorg.:100.log -configdir 
/run/user/1000/xpra/xorg.conf.d/4451 -config /etc/xpra/xorg.conf -depth 24 :100
      Xorg-usage-20200619b.txt:wirawan     4452  0.2  2.0 1112964 250020 ?      
Ssl  Jun17   8:40  \_ /usr/lib/xorg/Xorg-for-Xpra-:100 -noreset -novtswitch 
-nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth 
/home/wirawan/.Xauthority -logfile /run/user/1000/xpra/Xorg.:100.log -configdir 
/run/user/1000/xpra/xorg.conf.d/4451 -config /etc/xpra/xorg.conf -depth 24 :100
      Xorg-usage-20200623a.txt:wirawan     4452  0.1  2.0 1113092 250544 ?      
Ssl  Jun17  11:22  \_ /usr/lib/xorg/Xorg-for-Xpra-:100 -noreset -novtswitch 
-nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth 
/home/wirawan/.Xauthority -logfile /run/user/1000/xpra/Xorg.:100.log -configdir 
/run/user/1000/xpra/xorg.conf.d/4451 -config /etc/xpra/xorg.conf -depth 24 :100

  My desktop usage pattern:

  * MATE desktop
  * 4-desktop setting (standard default MATE when shipped)
  * GNUCASH
  * about 3 windows of terminal (each about 5-10 tabs)
  * XPRA running Firefox web browser (to isolate web browser pixmap memory 
usage, if that was the culprit)
  * LibreOffice (several windows open at any time)
  * using "redshift" to change the desktop color to red at night

  I have never seen this before using Ubuntu 20.04 on this machine.
  Before, when I was running Debian 8, I could run this machine for months 
literally without Xorg memory bloating rapidly like this (but then I was using 
xfce instead of MATE).
  I viewed the output of xrestop, the pixmap memory usage is dominated by marco 
and wnck-applet:

      xrestop - Display: localhost
              Monitoring 36 clients. XErrors: 0
              Pixmaps:  110748K total, Other:      84K total, All:  110833K 
total

      res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID 
Identifier    
      1000000    20    5    2   27 1701    70198K     42K  70241K  2585 marco
      1c00000     9    4    0    9   56    30428K      1K  30430K  2612 
wnck-applet
      1400000     8    4    1   21  116     3134K      4K   3138K  2603 Desktop
      0000000     2    0    2    0  178     2700K      6K   2706K   ?   
<unknown>
      3e00000     0    0    0    1    0     2700K      0B   2700K   ?   
<unknown>
      3a00000    17    3    1    8   92     1024K      3K   1027K  3728 
(terminal)

  In the previous boot (starting May 27 and ending June 17), the XOrg
  memory consumption grew to 1.7 GB total.

  I don't know exactly which software is responsible to cause this
  problem, so I started out with xorg server.

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: xserver-xorg-core 2:1.20.8-2ubuntu2.1
  ProcVersionSignature: Ubuntu 5.4.0-37.41-generic 5.4.41
  Uname: Linux 5.4.0-37-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu27.3
  Architecture: amd64
  BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
  CasperMD5CheckResult: skip
  CompositorRunning: None
  CurrentDesktop: MATE
  Date: Tue Jun 23 18:47:52 2020
  DistUpgraded: Fresh install
  DistroCodename: focal
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes
  GraphicsCard:
   Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA 
controller])
     Subsystem: Lenovo HD Graphics 5500 [17aa:5036]
  MachineType: LENOVO 20BXCTO1WW
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-37-generic 
root=UUID=4eafd225-50c7-46d9-b3f9-7982493a300d ro quiet splash vt.handoff=7
  SourcePackage: xorg-server
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 12/23/2015
  dmi.bios.vendor: LENOVO
  dmi.bios.version: JBET55WW (1.20 )
  dmi.board.asset.tag: Not Available
  dmi.board.name: 20BXCTO1WW
  dmi.board.vendor: LENOVO
  dmi.board.version: 0B98417 PRO
  dmi.chassis.asset.tag: No Asset Information
  dmi.chassis.type: 10
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: None
  dmi.modalias: 
dmi:bvnLENOVO:bvrJBET55WW(1.20):bd12/23/2015:svnLENOVO:pn20BXCTO1WW:pvrThinkpadT450s:rvnLENOVO:rn20BXCTO1WW:rvr0B98417PRO:cvnLENOVO:ct10:cvrNone:
  dmi.product.family: Thinkpad T450s
  dmi.product.name: 20BXCTO1WW
  dmi.product.sku: LENOVO_MT_20BX_BU_Think_FM_Thinkpad T450s
  dmi.product.version: Thinkpad T450s
  dmi.sys.vendor: LENOVO
  version.compiz: compiz N/A
  version.libdrm2: libdrm2 2.4.101-2
  version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.4-2ubuntu1
  version.libgl1-mesa-glx: libgl1-mesa-glx 20.0.4-2ubuntu1
  version.xserver-xorg-core: xserver-xorg-core 2:1.20.8-2ubuntu2.1
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 
2:2.99.917+git20200226-1
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1884850/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to