Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703026 - sys-power/pm-utils-1.4.1-r7: vm/dirty_ratio not being restored correctly, write performance suffers
Summary: sys-power/pm-utils-1.4.1-r7: vm/dirty_ratio not being restored correctly, wri...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2019-12-15 19:10 UTC by haarp
Modified: 2021-02-21 10:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description haarp 2019-12-15 19:10:31 UTC
Hello,

since upstream pm-utils officially stopped development and closes new bug reports, I'm hoping to get this bug fixed here.


If the user sets vm/dirty_bytes or vm/dirty_background_bytes, then the kernel interface will reset the values shown in *_ratio to 0 and use the values in *_bytes instead.

When pm-utils goes to battery mode, power.d/laptop-mode will write 60 and 40 into *_ratio. This resets the values in *_bytes to 0 instead.

When pm-utils returns to AC mode, it writes the previously recorded values from *_ratio back. Now both *_ratio and *_bytes are 0. The kernel interprets this as literal 0, and write performance absolutely TANKS down to sub-megabyte/s.


Summary: pm-utils sets vm/dirty_ratio to 60, then back to its original value. If the original value was 0 (from having set dirty_bytes), the system's write performance is now severely degraded.

Thanks!
Comment 1 haarp 2019-12-15 19:11:38 UTC
also see https://lwn.net/Articles/572911/ to understand dirty_ values
Comment 2 Pacho Ramos gentoo-dev 2019-12-15 22:12:34 UTC
Maybe migrating too use debian patches would be easier
Comment 3 haarp 2019-12-16 15:38:45 UTC
(In reply to Pacho Ramos from comment #2)
> Maybe migrating too use debian patches would be easier

Interesting. But the linked issue is not quite the same bug. From what I can tell, it's about pm-utils setting sub-optimal (default) values, thereby overriding user wishes.

My bug report is about pm-utils actually trying to restore values it thinks were the user-defined ones, but which aren't, thereby breaking write performance.

Still, it's related.

I wonder, tho, if the power.d/laptop-mode script is even sensible anymore on modern systems with SSDs, or if the easiest solution would be to just disable it by default.
Comment 4 Larry the Git Cow gentoo-dev 2021-02-21 10:57:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f146bb7e14ac3405429772d4adfef555f7810c20

commit f146bb7e14ac3405429772d4adfef555f7810c20
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2021-02-21 10:56:16 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-02-21 10:56:16 +0000

    sys-power/pm-utils: Remove last-rited pkg
    
    Closes: https://bugs.gentoo.org/659616
    Closes: https://bugs.gentoo.org/703026
    Closes: https://bugs.gentoo.org/666380
    Closes: https://bugs.gentoo.org/579912
    Closes: https://bugs.gentoo.org/549848
    Closes: https://bugs.gentoo.org/533168
    Closes: https://bugs.gentoo.org/489650
    Closes: https://bugs.gentoo.org/443530
    Closes: https://bugs.gentoo.org/442052
    Closes: https://bugs.gentoo.org/437930
    Closes: https://bugs.gentoo.org/426952
    Closes: https://bugs.gentoo.org/426510
    Closes: https://bugs.gentoo.org/403523
    Closes: https://bugs.gentoo.org/401257
    Closes: https://bugs.gentoo.org/362387
    Closes: https://bugs.gentoo.org/257156
    
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Signed-off-by: David Seifert <soap@gentoo.org>

 profiles/arch/amd64/package.use.mask               |  4 -
 profiles/arch/base/package.use.mask                |  4 -
 profiles/arch/hppa/use.mask                        |  4 -
 profiles/arch/x86/package.use.mask                 |  4 -
 sys-power/pm-utils/Manifest                        |  1 -
 .../pm-utils/files/1.4.1-bluetooth-sync.patch      | 43 ----------
 .../pm-utils/files/1.4.1-disable-sata-alpm.patch   | 24 ------
 sys-power/pm-utils/files/1.4.1-echo-n.patch        | 51 ------------
 sys-power/pm-utils/files/1.4.1-fix-alpm-typo.patch | 29 -------
 .../1.4.1-fix-intel-audio-powersave-hook.patch     | 40 ---------
 .../pm-utils/files/1.4.1-ignore-led-failure.patch  | 14 ----
 .../files/1.4.1-inhibit-on-right-status.patch      | 20 -----
 .../pm-utils/files/1.4.1-logging-append.patch      | 17 ----
 .../pm-utils/files/1.4.1-run-hook-logging.patch    | 17 ----
 .../pm-utils/files/1.4.1-suspend-hybrid.patch      | 36 ---------
 .../files/1.4.1-uswsusp-hibernate-mode.patch       | 19 -----
 .../files/1.4.1-xfs_buffer_arguments.patch         | 31 -------
 sys-power/pm-utils/files/pm-utils.logrotate        |  8 --
 sys-power/pm-utils/files/power.d/pci_devices       | 61 --------------
 sys-power/pm-utils/files/power.d/usb_bluetooth     | 45 -----------
 sys-power/pm-utils/files/sleep.d/50unload_alx      | 18 -----
 sys-power/pm-utils/metadata.xml                    | 10 ---
 sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild        | 94 ----------------------
 23 files changed, 594 deletions(-)