SSD read rate drops and access time increases after resume from suspend

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
GrumpyGreek
Level 1
Level 1
Posts: 4
Joined: Sun Oct 30, 2022 9:28 pm

SSD read rate drops and access time increases after resume from suspend

Post by GrumpyGreek »

Hello, I've been working on this problem for a couple days and haven't found any solutions. From googling, I've found a few people with similar problems, but most weren't quite the same and any solutions to their problems didn't help me.

My issue is as follows: I just installed Linux Mint 21 (64-bit, MATE) on an older Toshiba laptop with a Samsung SSD 870 EVO that I had been using for a few months in an even older laptop. After install, I had an issue that the SSD would disappear from the system if I did a reboot or suspended the laptop (e.g. closed the lid). (Shutdown and restart worked fine). The solution was to add "reboot=pci" to the kernel options in grub. Once I solved that problem, I thought everything was working great. I eventually realized that after resuming after a suspend, the SSD performance became terrible. After a fresh boot, running the gnome-disks benchmark gives a read rate of 550MB/s and an average access time of 0.06msec performance seems to stay high even after being up for several hours. However, after resuming from suspend, the same benchmark gives a read rate of 98MB/sec and an average access time of 106msec (no that's not a typo). Of course doing anything that reads from the disk takes much longer than it should and the processor spends a lot of time in IOWAIT.

The laptop is a Toshiba C55D-C5106 (stock except for the Samsung SSD).
My output from inxi -Fxxxrz is:

Code: Select all

~$ inxi -Fxxxrz
System:
  Kernel: 5.15.0-52-generic x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: MATE 1.26.0 info: mate-panel wm: marco 1.26.0 vt: 7
    dm: LightDM 1.30.0 Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: TOSHIBA product: Satellite C55D-C v: PSCQAU-001001
    serial: <superuser required>
  Mobo: FF50 model: 06F6 serial: <superuser required> UEFI: Insyde v: 5.20
    date: 10/05/2015
Battery:
  ID-1: BAT1 charge: 31.7 Wh (100.0%) condition: 31.7/44.1 Wh (72.0%)
    volts: 16.8 min: 14.8 model: Panasonic PA5185U-1BRS type: Li-ion
    serial: N/A status: Full cycles: 267
CPU:
  Info: quad core model: AMD A10-8700P Radeon R6 10 Compute Cores 4C+6G
    bits: 64 type: MT MCP smt: enabled arch: Excavator rev: 1 cache:
    L1: 320 KiB L2: 2 MiB
  Speed (MHz): avg: 1295 high: 1297 min/max: 1300/1800 boost: enabled
    cores: 1: 1295 2: 1295 3: 1297 4: 1296 bogomips: 14372
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Wani [Radeon R5/R6/R7 Graphics] vendor: Toshiba
    driver: amdgpu v: kernel ports: active: eDP-1 empty: HDMI-A-1,HDMI-A-2
    bus-ID: 00:01.0 chip-ID: 1002:9874 class-ID: 0300
  Device-2: Chicony TOSHIBA Web Camera - HD type: USB driver: uvcvideo
    bus-ID: 2-1:4 chip-ID: 04f2:b446 class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.3 compositor: marco v: 1.26.0
    driver: X: loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa gpu: amdgpu
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0")
    s-diag: 414mm (16.3")
  Monitor-1: eDP res: 1366x768 hz: 60 dpi: 101 size: 344x194mm (13.5x7.6")
    diag: 395mm (15.5")
  OpenGL: renderer: AMD Radeon R6 Graphics (carrizo LLVM 13.0.1 DRM 3.42
  5.15.0-52-generic)
    v: 4.6 Mesa 22.0.5 direct render: Yes
Audio:
  Device-1: AMD Kabini HDMI/DP Audio driver: snd_hda_intel v: kernel
    bus-ID: 00:01.1 chip-ID: 1002:9840 class-ID: 0403
  Device-2: AMD Family 15h Audio vendor: Toshiba driver: snd_hda_intel
    v: kernel bus-ID: 00:09.2 chip-ID: 1022:157a class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-52-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Toshiba
    driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 3000
    bus-ID: 01:00.0 chip-ID: 10ec:8136 class-ID: 0200
  IF: enp1s0 state: down mac: <filter>
  Device-2: Realtek RTL8723BE PCIe Wireless Network Adapter
    driver: rtl8723be v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 2000
    bus-ID: 02:00.0 chip-ID: 10ec:b723 class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
Bluetooth:
  Device-1: Toshiba Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 2-2:3 chip-ID: 0930:0222 class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter>
    bt-v: 2.1 lmp-v: 4.0 sub-v: 8723 hci-v: 4.0 rev: b
Drives:
  Local Storage: total: 232.89 GiB used: 19.62 GiB (8.4%)
  ID-1: /dev/sda vendor: Samsung model: SSD 870 EVO 250GB size: 232.89 GiB
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 1B6Q scheme: GPT
Partition:
  ID-1: / size: 227.68 GiB used: 19.61 GiB (8.6%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat
    dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 55.1 C mobo: N/A gpu: amdgpu temp: 55.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: apt: 2192
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com vanessa main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 227 Uptime: 28m wakeups: 1 Memory: 3.72 GiB
  used: 1.57 GiB (42.2%) Init: systemd v: 249 runlevel: 5 Compilers:
  gcc: 11.3.0 alt: 11 Shell: Bash v: 5.1.16 running-in: mate-terminal
  inxi: 3.3.13
Even with this issue the laptop still runs better than with Windows, but I hope someone has some insight about what's going on. Thanks in advance.
Last edited by LockBot on Mon May 01, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
GrumpyGreek
Level 1
Level 1
Posts: 4
Joined: Sun Oct 30, 2022 9:28 pm

Re: SSD read rate drops and access time increases after resume from suspend

Post by GrumpyGreek »

UPDATE:
I have found a work-around for now. I changed the sleep state that the system uses from S3 "deep" to S0 "s2idle" using the following echo s2idle > /sys/power/mem_sleep. I haven't explored how long the battery will last while in suspend, but at least I can close the lid and move the laptop without the performance tanking when I wake it back up.

Looking at /sys/power/mem_sleep, I have "s2idle" and "deep" as the only options. I believe that means that is all my system can support. I would like to be able to use the deeper sleep state if possible in order to maximize battery life. I assume the problem I have is that when the system goes to S3, it is giving a command to the SSD that is causing the drive to misbehave. Maybe there's a way to modify what commands are given while going into a sleep state? At least I have a usable system and an area to investigate further.

Any advice on where to investigate further would be appreciated.
Thanks.

EDIT: I pulled out my kill-a-watt and with the computer running but not doing anything it pulls about 16 watts. Using the s2idle suspend, it still draws 9.6 watts, and using S3 (deep), it pulls 0.5 watts (some of which might be from the battery being charged). So, s2idle is not a good solution in the long run.

Is this really such a unique problem that no one has any suggestions? :?
GrumpyGreek
Level 1
Level 1
Posts: 4
Joined: Sun Oct 30, 2022 9:28 pm

Re: SSD read rate drops and access time increases after resume from suspend

Post by GrumpyGreek »

UPDATE: I updated from Linux Mint 21 to 21.1. There is still no change in the behavior; the SSD performance tanks upon waking from suspend. Maybe I'll see if I can get a different brand of SSD to try, but this is sadly becoming a low priority since the machine is otherwise running great.
Locked

Return to “Storage”