linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Andres Klode <jak@jak-linux.org>
To: linux-ext4@vger.kernel.org
Subject: Please help: Is ext4 counting trims as writes, or is something killing my SSD?
Date: Thu, 12 Sep 2013 16:18:56 +0200	[thread overview]
Message-ID: <20130912141856.GA17640@jak-x230> (raw)

[-- Attachment #1: Type: text/plain, Size: 2876 bytes --]

Hi,

I installed my new laptop on Saturday and setup an ext4 filesystem
on my / and /home partitions. Without me doing much file transfers,
I noticed today:

jak@jak-x230:~$ cat /sys/fs/ext4/sdb3/lifetime_write_kbytes 
342614039

This is on a 100GB partition. I used fstrim multiple times. I analysed
the increase over some time today and issued an fstrim in between:

2013-09-12 15:53 341.582.779
2013-09-12 15:54 341.582.971
2013-09-12 15:58 341.583.103
2013-09-12 16:01 341.584.095
2013-09-12 16:04 341.584.475
2013-09-12 16:05 341.584.623		
	<fstrim -v /home => /home/: 1052205056 bytes were trimmed>
2013-09-12 16:07 342.612.167
2013-09-12 16:08 342.612.323
2013-09-12 16:10 342.613.995
2013-09-12 16:11 342.614.039
2013-09-12 16:15 342.614.291
2013-09-12 16:16 342.614.475

So it seems that ext4 counts the trims as writes? I don't know how I could
get 300GB of writes on a 100GB partition -- of which only 8 GB are occupied
-- otherwise.

My smart values for my SSD are:

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0003   100   100   070    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0003   100   100   000    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0002   100   100   000    Old_age   Always       -       23
 12 Power_Cycle_Count       0x0002   100   100   000    Old_age   Always       -       37
177 Wear_Leveling_Count     0x0003   100   100   000    Pre-fail  Always       -       465
178 Used_Rsvd_Blk_Cnt_Chip  0x0003   100   100   000    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0003   100   100   000    Pre-fail  Always       -       0
182 Erase_Fail_Count_Total  0x0003   100   100   000    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0002   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0003   100   100   000    Pre-fail  Always       -       7
196 Reallocated_Event_Count 0x0003   100   100   000    Pre-fail  Always       -       0
198 Offline_Uncorrectable   0x0003   100   100   000    Pre-fail  Always       -       0
199 UDMA_CRC_Error_Count    0x0003   100   100   000    Pre-fail  Always       -       0
232 Available_Reservd_Space 0x0003   100   100   010    Pre-fail  Always       -       0
241 Total_LBAs_Written      0x0003   100   100   000    Pre-fail  Always       -       1494
242 Total_LBAs_Read         0x0003   100   100   000    Pre-fail  Always       -       1308

Do those still look OK?

Please help,

I don't know what happens here.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2013-09-12 14:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 14:18 Julian Andres Klode [this message]
2013-09-12 14:26 ` Please help: Is ext4 counting trims as writes, or is something killing my SSD? Julian Andres Klode
2013-09-12 14:54 ` Calvin Walton
2013-09-12 15:03   ` Julian Andres Klode
2013-09-12 15:18   ` Eric Sandeen
2013-09-12 15:29     ` Calvin Walton
2013-09-12 15:33       ` Eric Sandeen
2013-09-12 15:32     ` Julian Andres Klode
2013-09-12 15:52       ` Eric Sandeen
2013-09-12 18:47         ` Theodore Ts'o
2013-09-13 13:41           ` Ric Wheeler
2013-09-13 13:38     ` Ric Wheeler
2013-09-12 15:19   ` Julian Andres Klode
2013-09-12 15:28     ` Theodore Ts'o
2013-09-12 15:29   ` Lukáš Czerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130912141856.GA17640@jak-x230 \
    --to=jak@jak-linux.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).