Lubuntu 23.04 - A lot of IO on my SSD (PCIe NVMe)

I’m on Lubuntu 23.04 with

Linux MYCOMPUTER 6.2.0-20-generic #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 6 07:48:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

On installation of Lubuntu I chose No Swap. I thought this is all that has to be done so eveything is done in RAM, applications don’t write there stuff to disk but keep everything for a session in RAM, only stuff that I wish to save to disk (modified files, downloaded files, etc.) is saved to disk.

But recently I see a lot of IO on my SSD (PCEe NvME), more or less seen by coincidence as I just wanted to see how the health of my SSD is, never checked it on Linux before.

I will do a post on StackOverflow regarding web browser behaviour on this, and reference it in the Lubuntu forum, as iotop showed continuous writing to disk by the web browsers.

I would like to make one change I found here Increase Performance and lifespan of SSDs & SD Cards to reduce unnecessary IO to disk, paragraph noatime Mount Flage

Is it safe to just add the line

/dev/sdx / ext4 discard,noatime,errors=remount-ro 0 1

as is at the end of /etc/fstab or do I need to change something else there too if I add it?
Off course /dev/sdx must be replaced by my drive /dev/nvme0n1.

On that kind of change do I have to reboot the system or is some kind of command via terminal sufficient?

My fstab file looks currently like this

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=1B0B-964E                            /boot/efi      vfat    defaults   0 2
UUID=6d51cb31-dd04-4957-9293-8bd867d0ffe6 /              ext4    defaults   0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

There is already a line containing noatime in my fstab file, which is the same to the paragraph Mount temporary directories as tmpfs given in the link.

I created a post at StackOverlflow, couldn’t tag it with Lubuntu because there was only a tag Ubuntu.

https://stackoverflow.com/questions/76363152/firefox-chromium-opera-a-lot-of-io-on-my-ssd-pcie-nvme-on-lubuntu

Also see Lubuntu 23.04 - A lot of IO on my SSD (PCIe NVMe)

StackOverflow doesn’t seem to be the right place for this topic, have to place it somewhere else.

Doew anybody know where to post this problem to tag also Firefox, Chromium and Opera to reach more people? At StackExchange, which might be suited?

I posted it now on linux - Firefox, Chromium, Opera - A lot of IO on my SSD (PCIe NVMe) on Lubuntu - Super User

The way I reduce disk i/o is by editing my /etc/fstab file and adding ‘noatime’ flag to my drives, then adding this to the end:

tmpfs /tmp         tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log     tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp     tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log/apt tmpfs defaults,noatime,mode=1777 0 0

Also by editing my /etc/sysctl.conf file and adding this line:

vm.swappiness=15

And as for the browsers, most chromium based browsers have a lot of disk access for cache, but in Firefox I disable the cache by going into about:config and changing these:

browser.cache.disk.enable (false)
browser.cache.memory.enable (false)
browser.cache.offline.enable (false)
network.prefetch-next (false)
browser.sessionhistory.max_total_viewers (0)
browser.sessionstore.interval (600000)

Remember to reboot for changes to take effect.

3 Likes

I was thinking, noticing, the following line in my current fstab is

UUID=6d51cb31-dd04-4957-9293-8bd867d0ffe6 / ext4 defaults 0 1

assuming that the UUID is my SSD drive… well, it looks like it is the UUID of the primary partition.

Comparing it to the recommended line in the link which is

/dev/sdx / ext4 discard,noatime,errors=remount-ro 0 1

it is almost the same besides the options. So maybe I could only change my line to become this

UUID=6d51cb31-dd04-4957-9293-8bd867d0ffe6 / ext4 discard,noatime,errors=remount-ro 0 1

Change the value defaults to discard,noatime,errors=remount-ro

I’m not sure if I understand

/etc/fstab file and adding ‘noatime’ flag to my drives

your line with your drive looks something like this?
UUID=<...some UUID...> / ext4 defaults,noatime 0 1

which would be slightly different from the recommended line in the link.

Some of those Firefox settings in about:config I have applied too, as I described in the StackExchange post Super User.

What I don’t understand is you are setting

browser.cache.memory.enable (false)

I found a suggestion to set it to true.

There are a lot more as it looks like, also for gfx.

1 Like

Regarding fstab I want to mention that I for now set it to

UUID=<...some UUID...> / ext4 defaults,noatime 0 1

Not sure if this is the best setting.
One website suggested to not use discard.

1 Like

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