Update 20200922 I have tested LibreOffice for a while. It did cause Xorg memory explosion again as explained below. I am excerpting my own personal notes here, please bear with the rough form of it. The graph that I will attach next will show the point.
I started using a LibreOFfice program at 2020-09-06; this was a relaunch after the last comment. At timestamp = 20200921T2330, I checked Xorg memory usage tonight after leaving LibreOffice open for over 11 days: Xorg RSS became swollen to over 1 GB! xorg RSS ... 1182768 kiB The "free" status was terrible: total used free shared buff/cache available Mem: 12144888 9761024 596696 710552 1787168 1353420 Swap: 1808384 1477752 330632 Three major users of Xorg memory: LibreOffice Writer ( PID:1760594 ): pixmap bytes : 334753205 1 - xfwm4 ( PID:1477670 ): pixmap bytes : 141633828 Mozilla Firefox ( PID:1816946 ): pixmap bytes : 44090522 The total of all three is ~520 MB. LibreOffice alone is eating up over 334 MB of RAM! NOTE: I did not use LibreOffice every day on this machine. But I left that program open since it was opened on Sept 6. I used the LO Writer occasionally to make notes now and then. Now I am closing the LibreOffice program, see what happened. Before LibreOffice doc was closed, the mem usage status was: LibreOffice pixmap bytes usage dropped to 286360981 (pixmap bytes) xfwm4 .... 131834529 (pixmap bytes) firefox .... 44090522 (pixmap bytes) xorg RSS .... 1203568 kiB => misleading, too much dumped to swap! Let's close LibreOffice; after closing (time marker = 20200922T0006) the usage: xfwm4 .... 98517409 firefox .... 44090522 xorg RSS .... 1192256 kiB A few observations: * As you can see above, xorg RSS was NOT significantly reduced even after I closed the LibreOffice. That was not the case with Firefox or with Xpra; the memory usage dropped as soon as I closed those programs. * I also remember from my past observations that *when this Xorg memory explosion occurred*, the RSS of the xorg server is way higher than the (rough) sum total of the pixmap memory consumption reported by xrestop. My fuzzy memory has it at about a factor of 4: RSS(Xorg) ~ 4x sum(pixmap bytes reported by xrestop) The example above did not quite support that though, but still, it is a factor of more than two! * I also looked at smaps: (ref: smaps-1600747980-20200922T001300.txt). That file indicates the largest memory occupied is in the heap: $ grep -e '^[0-9a-f]' -e 'Dirty' smaps-1600747980-20200922T001300.txt ... 55aa90005000-55aad31ae000 rw-p 00000000 00:00 0 [heap] Shared_Dirty: 0 kB Private_Dirty: 1078916 kB ... Now I closed Firefox as well: (after closure, timestamp: 20200922T0034) xfwm4 .... 61755763 xorg RSS .... 1149028 kiB Again, it looks like firefox X pixmap memory was freed ok (xorg RSS dropped by ~50 MB), but not much lower. -- 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: New 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