RAM/Memory Release After Closing Application

Ubuntu Version

Ubuntu 26.04 LTS

Desktop Environment (if applicable)

GNOME

Problem Description

When I close an application such as Firefox, Google Chrome, Microsoft Edge or Chromium on Ubuntu 26.04.1 LTS which has been installed on a new Dell XPS 13 DX13260, there seems to be residual memory/RAM being held by the closed application. I have tried to logout and log back in but that method doesn’t release the memory. I assume the memory being held cannot be the hardware since the laptop is brand new. Could the issue be the underlying kernel 7.0 that hasn’t been optimized for this newly released Dell laptop or ???

Relevant System Information

System:
  Host: XPS13-DX13260 Kernel: 7.0.0-30-generic arch: x86_64 bits: 64
  Desktop: GNOME v: 50.1 Distro: Ubuntu 26.04.1 LTS (Resolute Raccoon)
Machine:
  Type: Laptop System: Dell product: XPS 13 DX13260 v: 1.6.0
    serial: <superuser required>
  Mobo: Dell model: 0865D8 v: A04 serial: <superuser required>
    Firmware: UEFI vendor: Dell v: 1.6.0 date: 07/16/2026
Battery:
  ID-1: BAT0 charge: 37.7 Wh (69.5%) condition: 54.3/52 Wh (104.4%)
CPU:
  Info: 6-core model: Intel Core 5 320 bits: 64 type: MCP cache: L2: 10 MiB
  Speed (MHz): avg: 1069 min/max: 400/4600:4800:3400 cores: 1: 1069 2: 1069
    3: 1069 4: 1069 5: 1069 6: 1069
Graphics:
  Device-1: Intel Wildcat Lake [Intel Graphics] driver: xe v: kernel
  Device-2: Anker Innovations AnkerWork C310 Webcam
    driver: snd-usb-audio,uvcvideo type: USB
  Device-3: DisplayLink Dell Universal Hybrid Video Dock
    driver: cdc_ncm,snd-usb-audio type: USB
  Device-4: Kingcome Integrated_Webcam_FHD
    driver: hid-sensor-hub,usbhid,uvcvideo type: USB
  Display: wayland server: X.Org v: 24.1.10 with: Xwayland v: 24.1.10
    compositor: gnome-shell driver: dri: iris gpu: xe
    resolution: 2560x1440~120Hz
  API: EGL v: 1.5 drivers: iris,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 26.0.8-1ubuntu0.3
    renderer: Mesa Intel Graphics (WCL)
  Info: Tools: api: eglinfo,glxinfo x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel driver: sof-audio-pci-intel-ptl
  Device-2: Anker Innovations AnkerWork C310 Webcam
    driver: snd-usb-audio,uvcvideo type: USB
  Device-3: DisplayLink Dell Universal Hybrid Video Dock
    driver: cdc_ncm,snd-usb-audio type: USB
  Device-4: Creative Pebble X driver: hid-generic,snd-usb-audio,usbhid
    type: USB
  API: ALSA v: k7.0.0-30-generic status: kernel-api
  Server-1: PipeWire v: 1.6.2 status: active
Network:
  Device-1: Intel driver: N/A
  Device-2: Realtek USB 10/100/1G/2.5G LAN driver: r8152 type: USB
  IF: enx6c1ff7c01175 state: up speed: 2500 Mbps duplex: full
Bluetooth:
  Device-1: Intel driver: btintel_pcie
  Report: hciconfig ID: hci0 state: up address: 
Drives:
  Local Storage: total: 476.94 GiB used: 42.3 GiB (8.9%)
  ID-1: /dev/nvme0n1 vendor: KIOXIA model: EG6 512GB size: 476.94 GiB
Partition:
  ID-1: / size: 467.35 GiB used: 42.27 GiB (9.0%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 1.05 GiB used: 31.7 MiB (3.0%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) file: /swap.img
Sensors:
  System Temperatures: cpu: 35.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 0
Info:
  Memory: total: 16 GiB note: est. available: 14.7 GiB used: 8.72 GiB (59.3%)
  Processes: 449 Uptime: 15h 55m Shell: Bash inxi: 3.3.40

Screenshots

What I’ve Tried

Logging out of the operating system and logging back in.

You need to show at least three values - before the application is started, when the application is running and after application was stopped. Otherwise there is nothing to compare. And you should verify that the application was really stopped and its processes disappeared.

2 Likes

This complaint about Linux using too much RAM is so old and well-known that there is a website dedicated to it: https://www.linuxatemyram.com/ .

The gist of it is that Linux considers empty RAM to be a waste of money and energy and aggressively uses it for caching everything ever opened. That memory can quickly be freed when needed, but until it is it will be considered ‘in use’.

3 Likes

I totally agree about the 3x “RAM values” where there should be a 1) a before value, 2) a current value & 3) an after value. The before is 2.4MB. The current value when the applications is open is around 4.7MB and the after value is 3.6MB. So, when the application is closed or “killed process”, 1.2MB still has not been released.

Linux or Ubuntu LTS releases are actually much more efficient at utilizing memory/RAM on previous Dell XPS 13 systems I have owned than Microsoft Windows. But for some strange reason, this particular laptop hardware does not operate accordingly compared to my past experience. I know Ubuntu 26.04 LTS functions nominally on the Dell XPS 13 9340 where the DX13260 is replacing. Memory/RAM is released by the application is just fine so it’s all good. However, there is something peculiar about the DX13260. Maybe because the laptop is new, I don’t know.

If you use

free -m

Before, during and after, we may be able to advise

1 Like

Before

free -m -h
               total        used        free      shared  buff/cache   available
Mem:            14Gi       2.1Gi        11Gi       136Mi       1.1Gi        12Gi
Swap:          4.0Gi          0B       4.0Gi

During

free -m -h
               total        used        free      shared  buff/cache   available
Mem:            14Gi       3.4Gi        10Gi       207Mi       1.6Gi        11Gi
Swap:          4.0Gi          0B       4.0Gi

After

free -m -h
               total        used        free      shared  buff/cache   available
Mem:            14Gi       2.8Gi        10Gi       136Mi       1.5Gi        11Gi
Swap:          4.0Gi          0B       4.0Gi

The application being opened was Google Chrome surfing on the Google News webpage. The app was closed afterwards and these were the results.

The output looks perfectly normal to me.

I get similar results from using a web browser.

@hdd-gehrke already explained the reasons above.

My system is much lower spec than yours so I would not be concerned.

1 Like

The memory that “can be easily freed” is shown as buf/cache and is counted already as available. The used memory cannot be “easily freed”, otherwise it were not “used”.

@exhile What happens when you now again start and stop the same application? Does used memory continue to grow? Try several times capturing free output every time.

1 Like

Linux in memory caching is real as other have posted as well as browser sometimes cache a few processes in memory for faster startup times when re-opening the browser. Both occurrences result in slightly higher RAM usage after closing the browser (Chrome, Edge; etc.) but is harmless. The RAM will be reclaimed if needed by any active processes/apps so there’s really nothing to worry about concerning your browser RAM usage. Still, good attention to detail.

1 Like

@avb66

I conducted the process that you have instructed and the memory does not increase when I “start & stop the application” at least 3-4 times. So therefore the reasoning by @TheRaven does hold true.

@TheRaven

Yeah, I forgot about the operating system caching some parts of the application in memory for quicker retrieval if the application is re-opened. However, the cached application held in memory is unusually high compared to my experience with other Dell XPS 13 systems. Nevertheless, “it is what it is”.

@rubi1200

Thank-you for your advice & opinion. I feel a bit more relieved now that an explanation has somewhat resolved my issue.

1 Like

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.