Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NVMe and emerge compile
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Jun 09, 2023 3:53 pm    Post subject: Reply with quote

Black wrote:
Anon-E-moose wrote:
Do you have nvme-cli installed? It has lots of useful options for nvme investigation.


Yes I do, but I haven't used that before. Any hint as to which commands to look at?

Thank you (and everyone else)!


There are a few *log commands, get-log, error-log, etc, get* commands are usually safe :)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Black
Apprentice
Apprentice


Joined: 10 Dec 2002
Posts: 158
Location: Québec, Canada

PostPosted: Sun Jun 11, 2023 2:24 pm    Post subject: Reply with quote

I have put /tmp on tmpfs and set the kernel parameter
Code:
nvme_core.default_ps_max_latency_us=2000
, yet the Data Units Written (divided by the number of hours between 2 snapshots) for the past 24 hours have almost doubled.

eccerr0r wrote:
Searching the web, I get a lot of hits on kingston ssds having this behavior...

Currently I only have Intel, Samsung(mPCIe) Patriot (mPCIe), HP, and Micron/Crucial SSDs ... they don't seem to exhibit this behavior though the Samsung I accidentally swap stormed on and ate a chunk of its life ...


At this point it appears very likely that this is an issue with Kingston. I'm ordering a Crucial NVMe and I'll report back once I have a bit of data.

I'll still try to run those nvme-cli commands and see what it says.
Back to top
View user's profile Send private message
Black
Apprentice
Apprentice


Joined: 10 Dec 2002
Posts: 158
Location: Québec, Canada

PostPosted: Sat Jun 24, 2023 12:09 pm    Post subject: Reply with quote

It's been a few weeks, and while I have the new nvme on my desk, I haven't had the time to put it in.

That said, I have put /tmp on tmpfs a while ago, and the average data written had dropped from ~60,000KB/hour to around 5KB/hour. I did find out that Google Chrome likes to write a lot in /tmp, even when it's not doing anything (such as just being open while I sleep). I have also added the
Code:
--disk-cache-dir="/tmp/black/google-chrome"
command-line parameter to the Chrome shortcut, though it should not matter since /home is not on the NVMe to begin with. (I also added a cronjob to clear that cache every hour because it grows fast.)

As for the nvme-cli commands, I haven't been able to find any new information.

nvme error-log /dev/nvme0 is full is identical entries:
Code:
 Entry[63]   
.................
error_count   : 0
sqid      : 0
cmdid      : 0
status_field   : 0(Successful Completion: The command completed without error)
phase_tag   : 0
parm_err_loc   : 0
lba      : 0
nsid      : 0
vs      : 0
trtype      : The transport type is not indicated or the error is not transport related.
csi      : 0
opcode      : 0
cs      : 0
trtype_spec_info: 0
log_page_version: 0
.................


get-log is no help:
Code:
blackphoenix ~ # nvme get-log -l 512 /dev/nvme0
NVMe status: Invalid Log Page: The log page indicated is invalid(0x109)


smart-log shows the same information as smartctl:
Code:
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning         : 0x4
temperature            : 31 °C (304 K)
available_spare            : 100%
available_spare_threshold      : 10%
percentage_used            : 100%
endurance group critical warning summary: 0
Data Units Read            : 320,040 (163.86 GB)
Data Units Written         : 2,170,006,961 (1.11 PB)
host_read_commands         : 11,862,159
host_write_commands         : 8,589,274,821
controller_busy_time         : 97,527
power_cycles            : 48
power_on_hours            : 17,812
unsafe_shutdowns         : 18
media_errors            : 0
num_err_log_entries         : 0
Warning Temperature Time      : 0
Critical Composite Temperature Time   : 0
Thermal Management T1 Trans Count   : 0
Thermal Management T2 Trans Count   : 0
Thermal Management T1 Total Time   : 0
Thermal Management T2 Total Time   : 0
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Fri Jul 28, 2023 5:36 pm    Post subject: Reply with quote

holy crap so it was chrome that was writing that much crap to /tmp all this time, 60MB/hour?!? ugh... shared memory file? hmm.
Yeah have to use tmpfs a lot to placate software that thinks it should be able to write and rewrite (state files for crash mitigation)?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Fri Jul 28, 2023 5:47 pm    Post subject: Reply with quote

It is not only the browser ... Therefore I am using this solution: https://wiki.gentoo.org/wiki/SSD#XDG_cache_on_tmpfs

Now my ~/.cache is really empty; it is all now in /tmp/peter ... of course a tmpfs:
Code:
/tmp/peter/.cache # ls -al
insgesamt 27576
drwxr-xr-x  13 peter users      340 28. Jul 19:02  .
drwxr-xr-x   3 peter users       60 28. Jul 13:03  ..
drwxr-xr-x   2 peter users       60 28. Jul 13:03  akonadi_ical_resource_0
drwxr-xr-x   3 peter users       60 28. Jul 13:06  falkon
drwxr-xr-x   2 peter users      300 28. Jul 19:43  favicons
-rw-r--r--   1 peter users 10547304 28. Jul 17:08  icon-cache.kcache
drwxr-xr-x   2 peter users      160 28. Jul 19:39  kio_http
drwx------   3 peter users       60 28. Jul 13:05  konqueror
drwxr-xr-x   3 peter users       60 28. Jul 13:03  ksplash
-rw-r--r--   1 peter users   755290 28. Jul 13:03 'ksycoca5_de_9FMAPGKp1wKkh1j4orZoPhe4zb4='
drwxr-xr-x   3 peter users       60 28. Jul 15:21  kwin
drwxr-xr-x 110 peter users     2220 28. Jul 19:28  mesa_shader_cache
drwxr-xr-x   3 peter users       60 28. Jul 13:03  plasmashell
-rw-------   1 peter users    46301 28. Jul 19:02  plasma-svgelements
drwxr-xr-x   3 peter users       60 28. Jul 14:07  plasma-systemmonitor
-rw-r--r--   1 peter users 16875624 28. Jul 19:28  plasma_theme_default_v5.108.0.kcache
drwxr-xr-x   2 peter users      440 28. Jul 15:21  qtshadercache-x86_64-little_endian-lp64
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2007

PostPosted: Sat Jul 29, 2023 8:44 am    Post subject: Reply with quote

Interesting. My .cache has entries back to 2018, and is 1.4 GB. Somehow I suspect there's a lot of cruft there. I may try wiping the lot...
_________________
Greybeard
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sat Jul 29, 2023 1:57 pm    Post subject: Reply with quote

I wouldn't indiscriminately wipe .cache, seems it also holds temp files that were downloaded (and could be downloaded again) or precomputed files (and could be precomputed again) but kept for speed.

That being said my ~/.cache is 5GB (!) alas I don't see the SSD chomping... I don't use Chrome...

I also wonder what's XDG_CACHE_HOME compared to just putting cache files in $XDG_RUNTIME_DIR which should be a tmpfs on /run ? Could there be something in XDG_CACHE_HOME that should be kept from boot to boot for speed purposes?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2007

PostPosted: Sun Jul 30, 2023 6:55 am    Post subject: Reply with quote

eccerr0r wrote:
I wouldn't indiscriminately wipe .cache, seems it also holds temp files that were downloaded (and could be downloaded again) or precomputed files (and could be precomputed again) but kept for speed....

And that's the usual trouble with persistent cache - it may be fast, but it may be old and out of date.
I've moved my .cache to old.cache. So far nothing's broken. I need to try a few more critical apps - I experienced various Android apps losing their memory when I did similar to my (old) tablet computer, which of course is App writers not understanding "cache".
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum