Skip to content
Snippets Groups Projects
  1. Jan 12, 2017
  2. Jan 08, 2017
  3. Dec 27, 2016
  4. Dec 20, 2016
  5. Nov 25, 2016
  6. Nov 22, 2016
  7. Nov 04, 2016
  8. Nov 01, 2016
  9. Oct 21, 2016
  10. Oct 18, 2016
  11. Oct 11, 2016
  12. Sep 29, 2016
  13. Sep 22, 2016
  14. Sep 20, 2016
  15. Sep 15, 2016
  16. Sep 05, 2016
  17. Aug 21, 2016
  18. Aug 13, 2016
  19. Jul 27, 2016
  20. Jul 21, 2016
  21. Jul 19, 2016
  22. Jul 12, 2016
  23. Jun 23, 2016
  24. Jun 21, 2016
  25. Jun 20, 2016
    • DavidEdmundson's avatar
      Merge branch 'Plasma/5.7' · c671b462
      DavidEdmundson authored
      c671b462
    • Rob Wu's avatar
      Include the Slab value in the Cached value · 66eb88fb
      Rob Wu authored and DavidEdmundson's avatar DavidEdmundson committed
      Before this patch, Cached only counted the page cache.
      With this patch, the slab is also included. This change is visible
      through the APi in "mem/physical/application" and "mem/physical/cached".
      
      Why? For the calculation of used memory (`Appl`), the Slab should not
      be counted as used memory as it is a cache for kernel data structures.
      
      free (from procps) calculates "Used" memory as follows:
      MemTotal - MemFree - (Cached + Slab) - Buffers
      (you can verify this using the numbers from `cat /proc/meminfo`).
      
      This discrepancy in used memory was already noted before, at
      https://mail.kde.org/pipermail/plasma-devel/2008-December/002984.html
      
      > This "Slab" value [1] is not available from the systemmonitor. It usually
      > doesn't grow over 20MB at all anyway. I don't know how important this value
      > is, so is it a feasable solution to simply ignore this and only show used,
      > cache and buffer?
      
      After 10 days of usage, my slab looks like this:
      
      ```
      $ cat /proc/meminfo | grep Slab
      Slab:            2763208 kB
      ```
      
      Clearly, the slab is non-negligible and should be deducted.
      
      The immediate reason for writing this patch is that the "Memory Status"
      plasmoid displayed 4G of "memory usage" even after closing all programs.
      This was confusing, especially when `free -m` showed a much lower value.
      
      From 888675e9a712d626e6ddeeda1372219bd066efdc Mon Sep 17 00:00:00 2001
      From: Rob Wu <rob@robwu.nl>
      Date: Tue, 21 Jun 2016 00:06:51 +0200
      Subject: [PATCH] Include the Slab in the Cached
      
      Before this patch, Cached only counted the page cache.
      With this patch, the slab is also included. This change is visible
      through the APi in "mem/physical/application" and "mem/physical/cached".
      
      Why? For the calculation of used memory (`Appl`), the Slab should not
      be counted as used memory as it is a cache for kernel data structures.
      
      free (from procps) calculates "Used" memory as follows:
      MemTotal - MemFree - (Cached + Slab) - Buffers
      (you can verify this using the numbers from `cat /proc/meminfo`).
      
      This discrepancy in used memory was already noted before, at
      https://mail.kde.org/pipermail/plasma-devel/2008-December/002984.html
      
      > This "Slab" value [1] is not available from the systemmonitor. It usually
      > doesn't grow over 20MB at all anyway. I don't know how important this value
      > is, so is it a feasable solution to simply ignore this and only show used,
      > cache and buffer?
      
      After 10 days of usage, my slab looks like this:
      
      ```
      $ cat /proc/meminfo | grep Slab
      Slab:            2763208 kB
      ```
      
      Clearly, the slab is non-negligible and should be deducted.
      
      The immediate reason for writing this patch is that the "Memory Status"
      plasmoid displayed 4G of "memory usage" even after closing all programs.
      This was confusing, especially when `free -m` showed a much lower value.
      66eb88fb
  26. Jun 19, 2016
  27. Jun 17, 2016
  28. Jun 16, 2016
  29. May 31, 2016
  30. May 24, 2016
Loading