TL;DR: ΡΡΠ°ΡΡΡ ΡΠ°ΡΡΠΊΠ°Π·ΡΠ²Π°Π΅Ρ ΠΎΠ± ΡΠ΄ΠΎΠ±Π½ΠΎΠΌ, Π±ΡΡΡΡΠΎΠΌ ΠΈ Π½Π°Π΄Π΅ΠΆΠ½ΠΎΠΌ ΡΠΏΠΎΡΠΎΠ±Π΅ ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ Linux-ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ, Π·Π°ΠΏΠΈΡΡΠ²Π°ΡΡΠΈΡ
Π΄Π°Π½Π½ΡΠ΅ Π½Π° Π΄ΠΈΡΠΊ, ΡΡΠΎ ΠΏΠΎΠΌΠΎΠ³Π°Π΅Ρ Π² Π²ΡΡΠ²Π»Π΅Π½ΠΈΠΈ Π±ΠΎΠ»ΡΡΠΎΠΉ ΠΈΠ»ΠΈ Π°Π½ΠΎΠΌΠ°Π»ΡΠ½ΠΎ ΡΠ°ΡΡΠΎΠΉ Π½Π°Π³ΡΡΠ·ΠΊΠΈ Π½Π° Π΄ΠΈΡΠΊΠΎΠ²ΡΡ ΠΏΠΎΠ΄ΡΠΈΡΡΠ΅ΠΌΡ, Π° ΡΠ°ΠΊΠΆΠ΅ ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ ΠΎΡΠ΅Π½ΠΈΡΡ Π½Π°ΠΊΠ»Π°Π΄Π½ΡΠ΅ ΡΠ°ΡΡ
ΠΎΠ΄Ρ ΡΠ°ΠΉΠ»ΠΎΠ²ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ. ΠΡΠΎ ΠΎΡΠΎΠ±Π΅Π½Π½ΠΎ Π°ΠΊΡΡΠ°Π»ΡΠ½ΠΎ Π΄Π»Ρ SSD Π² ΠΠ, EMMC ΠΈ Flash-ΠΏΠ°ΠΌΡΡΠΈ Π² ΠΎΠ΄Π½ΠΎΠΏΠ»Π°ΡΠ½ΡΡ
ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ°Ρ
.
Π Ρ
ΠΎΠ΄Π΅ Π½Π°ΠΏΠΈΡΠ°Π½ΠΈΡ ΡΡΠ°ΡΡΠΈ ΠΎΠ±Π½Π°ΡΡΠΆΠΈΠ»ΠΎΡΡ, ΡΡΠΎ Π·Π°ΠΏΠΈΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΈΡ
ΠΊΠΈΠ»ΠΎΠ±Π°ΠΉΡ Π΄Π°Π½Π½ΡΡ
Π½Π° ΡΠ°ΠΉΠ»ΠΎΠ²ΡΡ ΡΠΈΡΡΠ΅ΠΌΡ BTRFS ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΡ ΠΊ Π·Π°ΠΏΠΈΡΠΈ 3 ΠΌΠ΅Π³Π°Π±Π°ΠΉΡ ΡΠ΅Π°Π»ΡΠ½ΡΡ
Π΄Π°Π½Π½ΡΡ
Π½Π° Π΄ΠΈΡΠΊ.
ΠΠ²Π΅Π΄Π΅Π½ΠΈΠ΅
Β«ΠΠΉ, Π΅ΡΡΠ½Π΄Π°, ΡΡΠ΅ΠΉΠΊΠΈ ΠΏΠ°ΠΌΡΡΠΈ Π½Π° ΡΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΡΡ
SSD Π²ΡΠΉΠ΄ΡΡ ΠΈΠ· ΡΡΡΠΎΡ ΡΠ΅ΡΠ΅Π· Π΄Π΅ΡΡΡΠΊΠΈ Π»Π΅Ρ ΠΎΠ±ΡΡΠ½ΠΎΠ³ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ, Π½Π΅ ΡΡΠΎΠΈΡ ΠΎΠ± ΡΡΠΎΠΌ Π±Π΅ΡΠΏΠΎΠΊΠΎΠΈΡΡΡΡ, ΠΈ ΡΠΆ ΡΠ΅ΠΌ Π±ΠΎΠ»Π΅Π΅ ΠΏΠ΅ΡΠ΅Π½ΠΎΡΠΈΡΡ swap, Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΠ΅ ΠΌΠ°ΡΠΈΠ½Ρ ΠΈ ΠΏΠ°ΠΏΠΊΡ ΠΏΡΠΎΡΠΈΠ»Ρ Π±ΡΠ°ΡΠ·Π΅ΡΠ° Π½Π° HDDΒ» β ΡΠΈΠΏΠΈΡΠ½ΡΠΉ ΠΎΡΠ²Π΅Ρ Π½Π° Π²ΠΎΠΏΡΠΎΡ ΠΎ Π½Π°Π΄Π΅ΠΆΠ½ΠΎΡΡΠΈ ΡΠ²Π΅ΡΠ΄ΠΎΡΠ΅Π»ΡΠ½ΡΡ
Π½Π°ΠΊΠΎΠΏΠΈΡΠ΅Π»Π΅ΠΉ c Π³Π°ΡΠ°Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΡΠΌΠΈ β150 TBW. ΠΡΠ»ΠΈ ΠΏΡΠΈΠΊΠΈΠ½ΡΡΡ, ΡΠΊΠΎΠ»ΡΠΊΠΎ ΡΠΈΠΏΠΈΡΠ½ΠΎΠ΅ ΠΠ ΠΌΠΎΠΆΠ΅Ρ ΠΏΠΈΡΠ°ΡΡ Π΄Π°Π½Π½ΡΡ
, ΡΠΎ ΠΊΠ°ΠΆΠ΅ΡΡΡ, ΡΡΠΎ 10-20 ΠΠ Π² ΡΡΡΠΊΠΈ β ΡΠΆΠ΅ Π±ΠΎΠ»ΡΡΠ°Ρ ΡΠΈΡΡΠ°, ΠΏΡΡΡΡ Π±ΡΠ΄Π΅Ρ ΠΌΠ°ΠΊΡΠΈΠΌΡΠΌ 40 ΠΠ, ΠΊΡΠ΄Π° ΡΠΆ Π±ΠΎΠ»ΡΡΠ΅. ΠΡΠΈ ΡΠ°ΠΊΠΈΡ
ΡΠΈΡΡΠ°Ρ
ΠΎΡΠ²Π΅Ρ Π²ΠΏΠΎΠ»Π½Π΅ ΡΠ°Π·ΡΠΌΠ΅Π½ β Π½ΡΠΆΠ½ΠΎ 10 Π»Π΅Ρ, ΡΡΠΎΠ±Ρ Π΄ΠΎΡΡΠΈΡΡ Π³Π°ΡΠ°Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
Π·Π½Π°ΡΠ΅Π½ΠΈΠΉ ΠΏΠΎ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Ρ ΠΏΠ΅ΡΠ΅Π·Π°ΠΏΠΈΡΠΈ ΡΡΠ΅Π΅ΠΊ, ΠΏΡΠΈ 40 ΠΠ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
Π΅ΠΆΠ΅Π΄Π½Π΅Π²Π½ΠΎ.
ΠΠ΄Π½Π°ΠΊΠΎ Π·Π° 6 Π»Π΅Ρ Ρ ΠΏΠΎΠ»ΡΠ·ΡΡΡΡ ΡΠΆΠ΅ ΡΡΠ΅ΡΡΠΈΠΌ SSD: Ρ ΠΏΠ΅ΡΠ²ΠΎΠ³ΠΎ Π²ΡΡΠ΅Π» ΠΈΠ· ΡΡΡΠΎΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅Ρ, Π° Π²ΡΠΎΡΠΎΠΉ Π½Π°ΡΠ°Π» ΠΏΠ΅ΡΠ΅ΠΌΠ΅ΡΠ°ΡΡ Π΄Π°Π½Π½ΡΠ΅ ΠΌΠ΅ΠΆΠ΄Ρ ΡΡΠ΅ΠΉΠΊΠ°ΠΌΠΈ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΡΠ°Π· Π² Π΄Π΅Π½Ρ, ΡΡΠΎ ΠΎΠ±ΠΎΡΠ°ΡΠΈΠ²Π°Π»ΠΎΡΡ 30-ΡΠ΅ΠΊΡΠ½Π΄Π½ΡΠΌΠΈ Π·Π°Π΄Π΅ΡΠΆΠΊΠ°ΠΌΠΈ Π² ΠΎΠ±ΡΠ»ΡΠΆΠΈΠ²Π°Π½ΠΈΠΈ Π·Π°ΠΏΠΈΡΠΈ.
ΠΠΎΡΠ»Π΅ 7 ΠΌΠ΅ΡΡΡΠ΅Π² ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ Π½ΠΎΠ²ΠΎΠ³ΠΎ SSD Ρ ΡΠ΅ΡΠΈΠ» ΠΏΡΠΎΠ²Π΅ΡΠΈΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
, ΠΊΠ°ΠΊ ΠΈΡ
ΡΠΎΠΎΠ±ΡΠ°Π΅Ρ ΡΠ°ΠΌ Π΄ΠΈΡΠΊ ΡΠ΅ΡΠ΅Π· SMART.
19.7 Π’Π.
ΠΡΠ΅Π³ΠΎ Π·Π° 7 ΠΌΠ΅ΡΡΡΠ΅Π² Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π» 13% ΠΎΡ Π³Π°ΡΠ°Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Π° Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
, ΠΏΡΠΈΡΠΎΠΌ, ΡΡΠΎ ΠΎΠ½ Π½Π°ΡΡΡΠΎΠ΅Π½ Π² ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠΈ Ρ ΡΠ΅ΠΊΠΎΠΌΠ΅Π½Π΄Π°ΡΠΈΡΠΌΠΈ ΠΏΠΎ Π²ΡΡΠ°Π²Π½ΠΈΠ²Π°Ρ ΡΠ°Π·Π΄Π΅Π»ΠΎΠ² ΠΈ Π½Π°ΡΡΡΠΎΠΉΠΊΠ΅ Π€Π‘, swap Ρ ΠΌΠ΅Π½Ρ ΠΏΠΎΡΡΠΈ Π½Π΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ, Π΄ΠΈΡΠΊΠΈ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΡ
ΠΌΠ°ΡΠΈΠ½ ΡΠ°Π·ΠΌΠ΅ΡΠ΅Π½Ρ Π½Π° HDD!
ΠΡΠΎ Π°Π½ΠΎΠΌΠ°Π»ΡΠ½ΠΎ Π±ΠΎΠ»ΡΡΠ°Ρ ΡΠΈΡΡΠ°, ΡΠ°ΠΊΠΈΠΌΠΈ ΡΠ΅ΠΌΠΏΠ°ΠΌΠΈ Π³Π°ΡΠ°Π½ΡΠΈΠΉΠ½ΡΠΉ TBW Π±ΡΠ΄Π΅Ρ ΠΏΡΠ΅Π²ΡΡΠ΅Π½ ΡΠ°Π½ΡΡΠ΅ Π΄ΠΎΡΡΠΈΠΆΠ΅Π½ΠΈΡ 5-Π»Π΅ΡΠ½Π΅Π³ΠΎ ΡΡΠΎΠΊΠ° Π³Π°ΡΠ°Π½ΡΠΈΠΈ Π΄ΠΈΡΠΊΠ°. ΠΠ° ΠΈ Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ ΠΌΠΎΠΉ ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ ΠΏΠΈΡΠ°ΡΡ ΠΏΠΎ 93 Π³ΠΈΠ³Π°Π±Π°ΠΉΡΠ° Π² ΡΡΡΠΊΠΈ! ΠΡΠΆΠ½ΠΎ ΠΏΡΠΎΠ²Π΅ΡΠΈΡΡ, ΡΠΊΠΎΠ»ΡΠΊΠΎ Π΄Π°Π½Π½ΡΡ
ΠΏΠΈΡΠ΅ΡΡΡ Π½Π° Π΄ΠΈΡΠΊ Π·Π° 10 ΠΌΠΈΠ½ΡΡβ¦
Total:
Writes Queued: 24,712, 2,237MiB
Writes Completed: 25,507, 2,237MiB
Write Merges: 58, 5,472KiB
2.2 ΠΠΈΠ, ΠΎ-Π³ΠΎ-Π³ΠΎ!
ΠΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΠ΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Π° Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ Π΄Π°Π½Π½ΡΡ Π½Π° Π΄ΠΈΡΠΊΠΎΠ²ΠΎΠ΅ ΡΡΡΡΠΎΠΉΡΡΠ²ΠΎ
ΠΡΠ»ΠΈ Π²Π°ΡΠ΅ ΡΡΡΡΠΎΠΉΡΡΠ²ΠΎ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΈΠ²Π°Π΅Ρ S.M.A.R.T. (SSD, EMMC, Π½Π΅ΠΊΠΎΡΠΎΡΡΠ΅ ΠΏΡΠΎΠΌΡΡΠ»Π΅Π½Π½ΡΠ΅ MicroSD), ΡΠΎ ΠΏΠ΅ΡΠ²ΡΠΌ Π΄Π΅Π»ΠΎΠΌ ΡΠ»Π΅Π΄ΡΠ΅Ρ Π·Π°ΠΏΡΠΎΡΠΈΡΡ Π΄Π°Π½Π½ΡΠ΅ Ρ Π½Π°ΠΊΠΎΠΏΠΈΡΠ΅Π»Ρ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ°ΠΌΠΈ smartctl
, skdump
ΠΈΠ»ΠΈ mmc
(ΠΈΠ· ΡΠΎΡΡΠ°Π²Π° mmc-utils).
ΠΡΠΈΠΌΠ΅Ρ Π²ΡΠ²ΠΎΠ΄Π° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ smartctl
$ sudo smartctl -a /dev/sdb
smartctl 7.0 2019-03-31 r4903 [x86_64-linux-5.3.11-200.fc30.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Samsung based SSDs
Device Model: Samsung SSD 860 EVO mSATA 250GB
Serial Number: S41MNC0KA13477K
LU WWN Device Id: 5 002538 e700fa64b
Firmware Version: RVT41B6Q
User Capacity: 250β―059β―350β―016 bytes [250 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: mSATA
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Tue Nov 19 01:48:50 2019 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 85) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
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
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 5171
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 459
177 Wear_Leveling_Count 0x0013 096 096 000 Pre-fail Always - 62
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 058 039 000 Old_age Always - 42
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 29
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 38615215765
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
ΠΠΎΠΉ SSD Ρ ΡΠ°Π½ΠΈΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ Π΄Π°Π½Π½ΡΡ Π² ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ΅ 241 Total_LBAs_Written, Π² Π»ΠΎΠ³ΠΈΡΠ΅ΡΠΊΠΈΡ Π±Π»ΠΎΠΊΠ°Ρ (LBA), Π° Π½Π΅ Π² Π±Π°ΠΉΡΠ°Ρ . Π Π°Π·ΠΌΠ΅Ρ Π»ΠΎΠ³ΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ Π±Π»ΠΎΠΊΠ° Π² ΠΌΠΎΡΠΌ ΡΠ»ΡΡΠ°Π΅ β 512 Π±Π°ΠΉΡ (Π΅Π³ΠΎ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ²ΠΈΠ΄Π΅ΡΡ Π² Π²ΡΠ²ΠΎΠ΄Π΅ smartctl, Π² Sector Size). Π§ΡΠΎΠ±Ρ ΠΏΠΎΠ»ΡΡΠΈΡΡ Π±Π°ΠΉΡΡ, Π½ΡΠΆΠ½ΠΎ ΡΠΌΠ½ΠΎΠΆΠΈΡΡ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ° Π½Π° 512.
38615215765 Γ 512 Γ· 1000 Γ· 1000 Γ· 1000 Γ· 1000 = 19,770 Π’Π
38615215765 Γ 512 Γ· 1024 Γ· 1024 Γ· 1024 Γ· 1024 = 17,981 Π’ΠΈΠ
ΠΡΠΎΠ³ΡΠ°ΠΌΠΌΠ° skdump
Π½Π° ΠΌΠΎΡΠΌ SSD ΠΏΡΡΠ°Π΅ΡΡΡ ΠΈΠ½ΡΠ΅ΡΠΏΡΠ΅ΡΠΈΡΠΎΠ²Π°ΡΡ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ Total_LBAs_Written ΠΊΠ°ΠΊ-ΡΠΎ ΠΏΠΎ-ΡΠ²ΠΎΠ΅ΠΌΡ, ΠΈΠ·-Π·Π° ΡΠ΅Π³ΠΎ Π²ΡΠ²ΠΎΠ΄ΠΈΡ 1296217.695 TB
, ΡΡΠΎ, ΠΎΡΠ΅Π²ΠΈΠ΄Π½ΠΎ, Π½Π΅ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎ.
Π§ΡΠΎΠ±Ρ ΡΠ·Π½Π°ΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π·Π°ΠΏΠΈΡΡΠ²Π°Π΅ΠΌΠΎΠΉ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠΈ Π½Π° ΡΡΠΎΠ²Π½Π΅ ΡΡΡΡΠΎΠΉΡΡΠ²Π°, Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΠΌΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΎΠΉ btrace
ΠΈΠ· ΡΠΎΡΡΠ°Π²Π° ΠΏΠ°ΠΊΠ΅ΡΠ° blktrace
. ΠΠ½Π° ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°Π΅Ρ ΠΊΠ°ΠΊ ΠΎΠ±ΡΡΡ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΡ Π·Π° Π²ΡΡ Π²ΡΠ΅ΠΌΡ ΡΠ°Π±ΠΎΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ, ΡΠ°ΠΊ ΠΈ ΠΎΡΠ΄Π΅Π»ΡΠ½ΡΠ΅ ΠΏΡΠΎΡΠ΅ΡΡΡ ΠΈ ΠΏΠΎΡΠΎΠΊΠΈ (Π² Ρ.Ρ. ΡΠ΄ΡΠ°), ΠΊΠΎΡΠΎΡΡΠ΅ Π²ΡΠΏΠΎΠ»Π½ΡΠ»ΠΈ Π·Π°ΠΏΠΈΡΡ.
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ, ΡΡΠΎΠ±Ρ ΡΠΎΠ±ΡΠ°ΡΡ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ Π·Π° 10 ΠΌΠΈΠ½ΡΡ, Π³Π΄Π΅ /dev/sdb β Π²Π°Ρ Π΄ΠΈΡΠΊ:
# btrace -w 600 -a write /dev/sdb
Π’ΠΈΠΏΠΈΡΠ½ΡΠΉ Π²ΡΠ²ΠΎΠ΄ ΠΊΠΎΠΌΠ°Π½Π΄Ρ
β¦
8,16 0 3253 50.085433192 0 C WS 125424240 + 64 [0]
8,16 0 3254 50.085550024 0 C WS 193577744 + 64 [0]
8,16 0 3255 50.085685165 0 C WS 197246976 + 64 [0]
8,16 0 3256 50.085936852 0 C WS 125736264 + 128 [0]
8,16 0 3257 50.086060780 0 C WS 96261752 + 64 [0]
8,16 0 3258 50.086195031 0 C WS 94948640 + 64 [0]
8,16 0 3259 50.086327355 0 C WS 124656144 + 64 [0]
8,16 0 3260 50.086843733 15368 C WSM 310218496 + 32 [0]
8,16 0 3261 50.086975238 753 A WSM 310218368 + 32 <- (8,20) 291339904
8,16 0 3262 50.086975560 753 Q WSM 310218368 + 32 [dmcrypt_write/2]
8,16 0 3263 50.086977345 753 G WSM 310218368 + 32 [dmcrypt_write/2]
8,16 0 3264 50.086978072 753 I WSM 310218368 + 32 [dmcrypt_write/2]
8,16 0 3265 50.086979159 753 D WSM 310218368 + 32 [dmcrypt_write/2]
8,16 0 3266 50.087055685 0 C WSM 310218368 + 32 [0]
8,16 0 3267 50.087060168 753 A WSM 310218592 + 160 <- (8,20) 291340128
8,16 0 3268 50.087060367 753 Q WSM 310218592 + 160 [dmcrypt_write/2]
8,16 0 3269 50.087061242 753 G WSM 310218592 + 160 [dmcrypt_write/2]
8,16 0 3270 50.087061698 753 I WSM 310218592 + 160 [dmcrypt_write/2]
8,16 0 3271 50.087062361 753 D WSM 310218592 + 160 [dmcrypt_write/2]
8,16 0 3272 50.087386179 0 C WSM 310218592 + 160 [0]
8,16 0 3273 50.087436417 15368 A FWS 0 + 0 <- (253,1) 0
8,16 0 3274 50.087437471 15368 Q FWS [LS Thread]
8,16 0 3275 50.087440862 15368 G FWS [LS Thread]
8,16 0 3276 50.088300047 0 C WS 0 [0]
8,16 0 3277 50.088470917 753 A WFSM 18882688 + 8 <- (8,20) 4224
8,16 0 3278 50.088471091 753 Q WFSM 18882688 + 8 [dmcrypt_write/2]
8,16 0 3279 50.088471688 753 G WFSM 18882688 + 8 [dmcrypt_write/2]
8,16 0 3280 50.088474334 32254 D WSM 18882688 + 8 [kworker/0:2H]
8,16 0 3281 50.088515572 0 C WSM 18882688 + 8 [0]
8,16 0 3282 50.089229069 0 C WSM 18882688 [0]
CPU0 (8,16):
Reads Queued: 0, 0KiB Writes Queued: 345, 25,932KiB
Read Dispatches: 0, 0KiB Write Dispatches: 331, 25,788KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 0, 0KiB Writes Completed: 1,597, 117,112KiB
Read Merges: 0, 0KiB Write Merges: 1, 16KiB
Read depth: 0 Write depth: 177
IO unplugs: 0 Timer unplugs: 0
CPU1 (8,16):
Reads Queued: 0, 0KiB Writes Queued: 502, 39,948KiB
Read Dispatches: 0, 0KiB Write Dispatches: 495, 40,076KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 0, 0KiB Writes Completed: 0, 0KiB
Read Merges: 0, 0KiB Write Merges: 0, 0KiB
Read depth: 0 Write depth: 177
IO unplugs: 0 Timer unplugs: 0
CPU2 (8,16):
Reads Queued: 0, 0KiB Writes Queued: 297, 26,800KiB
Read Dispatches: 0, 0KiB Write Dispatches: 287, 26,800KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 0, 0KiB Writes Completed: 0, 0KiB
Read Merges: 0, 0KiB Write Merges: 0, 0KiB
Read depth: 0 Write depth: 177
IO unplugs: 0 Timer unplugs: 0
CPU3 (8,16):
Reads Queued: 0, 0KiB Writes Queued: 418, 24,432KiB
Read Dispatches: 0, 0KiB Write Dispatches: 408, 24,448KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 0, 0KiB Writes Completed: 0, 0KiB
Read Merges: 0, 0KiB Write Merges: 2, 272KiB
Read depth: 0 Write depth: 177
IO unplugs: 0 Timer unplugs: 0
Total (8,16):
Reads Queued: 0, 0KiB Writes Queued: 1,562, 117,112KiB
Read Dispatches: 0, 0KiB Write Dispatches: 1,521, 117,112KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 0, 0KiB Writes Completed: 1,597, 117,112KiB
Read Merges: 0, 0KiB Write Merges: 3, 288KiB
IO unplugs: 0 Timer unplugs: 0
Throughput (R/W): 0KiB/s / 2,338KiB/s
Events (8,16): 9,287 entries
Skips: 0 forward (0 - 0.0%)
btrace
ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ Π½Π°Π³Π»ΡΠ΄Π½ΠΎ ΠΏΠΎΡΠΌΠΎΡΡΠ΅ΡΡ ΡΠ΅Π°Π»ΡΠ½ΠΎΠ΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
, Π½ΠΎ ΠΏΠΎΠ½ΡΡΡ, ΠΊΠ°ΠΊΠΈΠ΅ ΠΈΠΌΠ΅Π½Π½ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΡΠΎΠ²Π΅ΡΡΠ°ΡΡ Π·Π°ΠΏΠΈΡΡ, ΠΈΠ· Π΅Ρ Π²ΡΠ²ΠΎΠ΄Π° ΡΠ»ΠΎΠΆΠ½ΠΎ.
ΠΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ, ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΡΡΠΈΡ Π·Π°ΠΏΠΈΡΡ Π½Π° Π½Π°ΠΊΠΎΠΏΠΈΡΠ΅Π»Ρ
ΠΡΠΎΠ³ΡΠ°ΠΌΠΌΠ° iotop
ΠΏΠΎΠΊΠ°ΠΆΠ΅Ρ ΠΏΡΠΎΡΠ΅ΡΡΡ, ΠΏΠΈΡΡΡΠΈΠ΅ Π½Π° Π΄ΠΈΡΠΊ, ΠΈ ΡΠ°Π·ΠΌΠ΅Ρ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
.
ΠΠ°ΠΈΠ±ΠΎΠ»Π΅Π΅ ΡΠ΄ΠΎΠ±Π½ΡΠΉ Π²ΡΠ²ΠΎΠ΄ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠΈΠ²Π°ΡΡ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΡ:
# iotop -obPat
ΠΡΠΈΠΌΠ΅Ρ Π²ΡΠ²ΠΎΠ΄Π° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ
02:55:47 Total DISK READ : 0.00 B/s | Total DISK WRITE : 30.65 K/s
02:55:47 Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
TIME PID PRIO USER DISK READ DISK WRITE SWAPIN IO COMMAND
b'02:55:47 753 be/4 root 0.00 B 0.00 B 0.00 % 0.04 % [dmcrypt_write/2]'
b'02:55:47 788 be/4 root 72.00 K 18.27 M 0.00 % 0.02 % [btrfs-transacti]'
b'02:55:47 15057 be/4 valdikss 216.00 K 283.05 M 0.00 % 0.01 % firefox'
b'02:55:47 1588 ?dif root 0.00 B 0.00 B 0.00 % 0.00 % Xorg -nolisten tcp -auth /var/run/sddm/{398f030f-9667-4dff-b371-81eaae48dfdf} -background none -noreset -displayfd 18 -seat seat0 vt1'
b'02:55:47 15692 be/4 valdikss 988.00 K 9.41 M 0.00 % 0.00 % python3 /usr/bin/gajim'
b'02:55:47 15730 ?dif valdikss 9.07 M 0.00 B 0.00 % 0.00 % telegram-desktop --'
b'02:55:47 2174 ?dif valdikss 1840.00 K 2.47 M 0.00 % 0.00 % yakuake'
b'02:55:47 19827 be/4 root 16.00 K 896.00 K 0.00 % 0.00 % [kworker/u16:7-events_unbound]'
b'02:55:47 19074 be/4 root 16.00 K 480.00 K 0.00 % 0.00 % [kworker/u16:4-btrfs-endio-write]'
b'02:55:47 19006 be/4 root 16.00 K 1872.00 K 0.00 % 0.00 % [kworker/u16:1-events_unbound]'
b'02:55:47 1429 be/4 root 484.00 K 0.00 B 0.00 % 0.00 % accounts-daemon'
b'02:55:47 15820 be/4 valdikss 312.00 K 0.00 B 0.00 % 0.00 % firefox -contentproc -childID 6 -isForBrowser -prefsLen 7894 -prefMapSize 223880 -parentBuildID 20191022164834 -greomni /usr/lib64/firefox/omni.ja -appomni /usr/lib64/firefox/browser/omni.ja -appdir /usr/lib64/firefox/browser 15057 tab'
b'02:55:47 2125 ?dif valdikss 0.00 B 92.00 K 0.00 % 0.00 % plasmashell'
b'02:55:47 1268 be/3 root 0.00 B 4.00 K 0.00 % 0.00 % auditd'
b'02:55:47 1414 be/4 root 0.00 B 4.00 K 0.00 % 0.00 % sssd_nss --uid 0 --gid 0 --logger=files'
b'02:55:47 15238 be/4 valdikss 0.00 B 4.00 K 0.00 % 0.00 % thunderbird'
b'02:55:47 18605 be/4 root 0.00 B 3.19 M 0.00 % 0.00 % [kworker/u16:0-btrfs-endio-write]'
b'02:55:47 18867 be/4 root 0.00 B 96.00 K 0.00 % 0.00 % [kworker/u16:5-btrfs-endio-meta]'
b'02:55:47 19070 be/4 root 0.00 B 160.00 K 0.00 % 0.00 % [kworker/u16:2-btrfs-freespace-write]'
b'02:55:47 19645 be/4 root 0.00 B 2.17 M 0.00 % 0.00 % [kworker/u16:3-events_unbound]'
b'02:55:47 19982 be/4 root 0.00 B 496.00 K 0.00 % 0.00 % [kworker/u16:6-btrfs-endio-write]'
Π Π³Π»Π°Π·Π° Π±ΡΠΎΡΠ°Π΅ΡΡΡ Firefox, Π·Π°ΠΏΠΈΡΠ°Π²ΡΠΈΠΉ 283 ΠΌΠ΅Π³Π°Π±Π°ΠΉΡΠ° Π·Π° Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΌΠΈΠ½ΡΡ ΡΠ°Π±ΠΎΡΡ iotop.
ΠΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΠ΅ ΡΠ°ΠΉΠ»ΠΎΠ², Π² ΠΊΠΎΡΠΎΡΡΠ΅ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΡΡ Π·Π°ΠΏΠΈΡΡ
ΠΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ ΠΎ ΠΏΡΠΎΡΠ΅ΡΡΠ΅, Π½Π°ΡΠΈΠ»ΡΡΡΠΈΠΌ Π΄ΠΈΡΠΊ β Ρ ΠΎΡΠΎΡΠΎ, Π° ΠΏΡΡΠΈ, ΠΏΠΎ ΠΊΠΎΡΠΎΡΡΠΌ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΡΡ Π·Π°ΠΏΠΈΡΡ β Π΅ΡΠ΅ Π»ΡΡΡΠ΅.
ΠΠΎΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΠΌΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΎΠΉ fatrace
, ΠΊΠΎΡΠΎΡΠ°Ρ ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π΅Ρ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΠ°ΠΉΠ»ΠΎΠ²ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ.
# fatrace -f W
ΠΡΠΈΠΌΠ΅Ρ Π²ΡΠ²ΠΎΠ΄Π° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ
firefox(15057): CW /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite-wal
firefox(15057): CW /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): CW /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/usage-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/usage
firefox(15057): CW /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/usage
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite-wal
firefox(15057): CW /home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/https+++habr.com/ls/data.sqlite-journal
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite
firefox(15057): W /home/valdikss/.mozilla/firefox/xyf4vqh2.default/webappsstore.sqlite
Fatrace Π½Π΅ ΡΠΌΠ΅Π΅Ρ ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°ΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ Π΄Π°Π½Π½ΡΡ Π²ΡΠ»Π΅Π΄ΡΡΠ²ΠΈΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ Π΄ΠΎΠ²ΠΎΠ»ΡΠ½ΠΎ ΠΏΡΠΎΡΡΠΎΠ³ΠΎ ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π½ΠΈΡ ΡΠ°ΠΊΡΠ° ΠΎΠ±ΡΠ°ΡΠ΅Π½ΠΈΡ ΠΊ ΡΠ°ΠΉΠ»Π°ΠΌ ΡΠ΅ΡΠ΅Π· inotify.
ΠΠ· Π²ΡΠ²ΠΎΠ΄Π° Π²ΠΈΠ΄Π½ΠΎ, ΠΊΠ°ΠΊ Ρ Π°Π±Ρ ΡΠΎΡ ΡΠ°Π½ΡΠ΅Ρ ΠΌΠΎΡ ΡΡΠ°ΡΡΡ Π² local storage Π±ΡΠ°ΡΠ·Π΅ΡΠ°, ΠΏΠΎΠΊΠ° Ρ Π΅Ρ ΠΏΠΈΡΡ, Π° ΡΠ°ΠΊΠΆΠ΅ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΠ΅ Group Speed Dial, ΠΊΠΎΡΠΎΡΠΎΠ΅, ΠΊΠ°ΠΊ ΡΠ΄Π°Π»ΠΎΡΡ ΠΎΠ±Π½Π°ΡΡΠΆΠΈΡΡ ΠΈΠΌΠ΅Π½Π½ΠΎ Ρ ΠΏΠΎΠΌΠΎΡΡΡ fatrace, ΡΠΈΡΠ°Π΅Ρ ΡΠ²ΠΎΠΈ Π΄Π°Π½Π½ΡΠ΅ ΠΊΠ°ΠΆΠ΄ΡΠ΅ 30 ΡΠ΅ΠΊΡΠ½Π΄. ΠΠΌΠ΅Π½Π½ΠΎ ΡΠΈΡΠ°Π΅Ρ, Π° Π½Π΅ Π·Π°ΠΏΠΈΡΡΠ²Π°Π΅Ρ: CW ΠΏΠ΅ΡΠ΅Π΄ ΡΠ°ΠΉΠ»ΠΎΠΌ Π³ΠΎΠ²ΠΎΡΠΈΡ ΠΎ ΡΠΎΠΌ, ΡΡΠΎ ΡΠ°ΠΉΠ» ΠΎΡΠΊΡΡΠ²Π°Π΅ΡΡΡ Π½Π° ΡΡΠ΅Π½ΠΈΠ΅ ΠΈ Π·Π°ΠΏΠΈΡΡ, Ρ ΠΎΠ΄Π½ΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΡΠΌ ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ΠΌ ΡΠ°ΠΉΠ»Π°, Π΅ΡΠ»ΠΈ ΠΎΠ½ ΠΎΡΡΡΡΡΡΠ²ΡΠ΅Ρ (Π²ΡΠ·ΡΠ²Π°Π΅ΡΡΡ openat Ρ ΡΠ»Π°Π³ΠΎΠΌ O_RDWR|O_CREAT), Π½ΠΎ Π½Π΅ Π³ΠΎΠ²ΠΎΡΠΈΡ, ΡΡΠΎ Π² ΡΠ°ΠΉΠ» Π΄Π΅ΠΉΡΡΠ²ΠΈΡΠ΅Π»ΡΠ½ΠΎ ΠΏΠΈΡΠ°Π»Π°ΡΡ ΠΊΠ°ΠΊΠ°Ρ-Π»ΠΈΠ±ΠΎ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ.
ΠΠ° Π²ΡΡΠΊΠΈΠΉ ΡΠ»ΡΡΠ°ΠΉ, ΡΡΠΎΠ±Ρ ΡΠ΄ΠΎΡΡΠΎΠ²Π΅ΡΠΈΡΡΡΡ Π² ΡΡΠΎΠΌ, Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΠΌΡΡ strace, Ρ ΡΠΈΠ»ΡΡΡΠΎΠΌ Π½Π° ΡΠ°ΠΉΠ»ΠΎΠ²ΡΠ΅ ΡΠΈΡΡΠ΅ΠΌΠ½ΡΠ΅ Π²ΡΠ·ΠΎΠ²Ρ:
strace -yy -e trace=open,openat,close,write -f -p 15057 2>&1 | grep extension
ΠΡΠ²ΠΎΠ΄ ΠΊΠΎΠΌΠ°Π½Π΄Ρ
[pid 20352] openat(AT_FDCWD, "/home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 153</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>
[pid 20352] read(153</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>, "SQLite format 3 20 22 @ d 23"..., 100) = 100
[pid 20352] read(153</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>, "SQLite format 3 20 22 @ d 23"..., 4096) = 4096
[pid 20352] openat(AT_FDCWD, "/home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite-wal", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 166</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite-wal>
β¦
[pid 20352] read(54</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>, " r4304364354354364- 4204!4'414" 250 &"..., 4096) = 4096
[pid 20352] read(54</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>, " 136Pt2262504 O24532016:"16.27 r245306>2461t1q370"..., 4096) = 4096
[pid 20352] close(77</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite-wal>) = 0
[pid 20352] close(54</home/valdikss/.mozilla/firefox/xyf4vqh2.default/storage/default/moz-extension+++e5c304fb-af40-498a-9ba8-47eb0416e933^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite>) = 0
ΠΠ΅Ρ Π½ΠΈ ΠΎΠ΄Π½ΠΎΠ³ΠΎ Π²ΡΠ·ΠΎΠ²Π° write()
, ΡΡΠΎ Π³ΠΎΠ²ΠΎΡΠΈΡ ΠΎΠ± ΠΎΡΡΡΡΡΡΠ²ΠΈΠΈ Π·Π°ΠΏΠΈΡΠΈ Π² ΡΠ°ΠΉΠ».
ΠΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΠ΅ Π½Π°ΠΊΠ»Π°Π΄Π½ΡΡ ΡΠ°ΡΡ ΠΎΠ΄ΠΎΠ² ΡΠ°ΠΉΠ»ΠΎΠ²ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ
ΠΠΎΠ»ΡΡΠ°Ρ ΡΠ°Π·Π½ΠΈΡΠ° Π² ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΈΡΡ
iotop
ΠΈ btrace
Π½Π°ΡΠΎΠ»ΠΊΠ½ΡΠ»Π° Π½Π° ΠΌΡΡΠ»Ρ ΠΏΡΠΎΡΠ΅ΡΡΠΈΡΠΎΠ²Π°ΡΡ ΡΠ°ΠΉΠ»ΠΎΠ²ΡΡ ΡΠΈΡΡΠ΅ΠΌΡ ΠΏΡΡΠ΅ΠΌ ΡΡΡΠ½ΠΎΠΉ Π·Π°ΠΏΠΈΡΠΈ Π΄Π°Π½Π½ΡΡ
Π² ΡΠ°ΠΉΠ» ΠΈ ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π½ΠΈΡ ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΈΠΉ btrace.
ΠΡΠ»ΠΈ ΠΏΠΎΠ»Π½ΠΎΡΡΡΡ ΠΈΡΠΊΠ»ΡΡΠΈΡΡ Π·Π°ΠΏΠΈΡΡ Π½Π° Π΄ΠΈΡΠΊ, Π·Π°Π³ΡΡΠ·ΠΈΠ²ΡΠΈΡΡ Π² emergency-ΡΠ΅ΠΆΠΈΠΌ systemd, ΠΈ Π·Π°ΠΏΠΈΡΠ°ΡΡ Π²ΡΡΡΠ½ΡΡ ΠΏΠ°ΡΡ Π±Π°ΠΉΡ Π΄Π°Π½Π½ΡΡ
Π² ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠΈΠΉ ΡΠ°ΠΉΠ», btrace Π½Π° SSD Ρ btrfs ΡΠΎΠΎΠ±ΡΠ°Π΅Ρ ΠΎ Π·Π°ΠΏΠΈΡΠΈ 3 ΠΌΠ΅Π³Π°Π±Π°ΠΉΡ ΡΠ΅Π°Π»ΡΠ½ΡΡ
Π΄Π°Π½Π½ΡΡ
. Π‘Π²Π΅ΠΆΠ΅ΡΠΎΠ·Π΄Π°Π½Π½Π°Ρ ΡΠ°ΠΉΠ»ΠΎΠ²Π°Ρ ΡΠΈΡΡΠ΅ΠΌΠ° ΡΠ»Π΅ΡΠΊΠ΅ ΡΠ°Π·ΠΌΠ΅ΡΠΎΠΌ Π² 8 ΠΠ Π·Π°ΠΏΠΈΡΡΠ²Π°Π΅Ρ ΠΌΠΈΠ½ΠΈΠΌΡΠΌ 264 ΠΠΈΠ ΠΏΡΠΈ Π·Π°ΠΏΠΈΡΠΈ ΠΎΠ΄Π½ΠΎΠ³ΠΎ Π±Π°ΠΉΡΠ°.
ΠΠ»Ρ ΡΡΠ°Π²Π½Π΅Π½ΠΈΡ, Π·Π°ΠΏΠΈΡΡ ΠΏΠ°ΡΡ Π±Π°ΠΉΡ Π² ΡΠ°ΠΉΠ» Π½Π° ext4 ΠΎΠΊΠ°Π½ΡΠΈΠ²Π°Π΅ΡΡΡ Π·Π°ΠΏΠΈΡΡΡ 24 ΠΊΠΈΠ»ΠΎΠ±Π°ΠΉΡΠΎΠ² Π΄Π°Π½Π½ΡΡ
Π½Π° Π΄ΠΈΡΠΊ.
Π 2017 Π³ΠΎΠ΄Ρ Jayashree Mohan, Rohan Kadekodi ΠΈ Vijay Chidambaram
ΠΠ°ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΠΈ Π²ΡΠ²ΠΎΠ΄
ΠΡΡΡΠΌ ΠΎΠΏΠΈΡΠ°Π½Π½ΡΡ ΠΌΠ°Π½ΠΈΠΏΡΠ»ΡΡΠΈΠΉ ΠΎΠ±Π½Π°ΡΡΠΆΠΈΠ»ΠΎΡΡ:
- Π§Π°ΡΡΠ°Ρ Π·Π°ΠΏΠΈΡΡ ΡΠΎΡΡΠΎΡΠ½ΠΈΠΉ Π·Π°Π΄Π°Π½ΠΈΠΉ Π΄Π»Ρ ΠΏΡΠΈΠ½ΡΠ΅ΡΠ° Π΄Π΅ΠΌΠΎΠ½ΠΎΠΌ ΠΏΠ΅ΡΠ°ΡΠΈ CUPS Π² /var/cache/cups ΠΊΠ°ΠΆΠ΄ΡΡ ΠΌΠΈΠ½ΡΡΡ. ΠΡΠΎΠ±Π»Π΅ΠΌΠ° ΡΡΡΡΠ°Π½Π΅Π½Π° ΠΎΡΠΈΡΡΠΊΠΎΠΉ /var/spool/cups (Ρ ΠΎΡΡ Π½ΠΈΠΊΠ°ΠΊΠΈΡ Π·Π°Π΄Π°Π½ΠΈΠΉ ΠΏΠ΅ΡΠ°ΡΠΈ Π½Π΅ Π±ΡΠ»ΠΎ);
- Π€Π°ΠΊΡ ΡΡΠ΅Π½ΠΈΡ Π±Π°Π·Ρ Π΄Π°Π½Π½ΡΡ ΠΊΠ°ΠΆΠ΄ΡΠ΅ 30 ΡΠ΅ΠΊΡΠ½Π΄ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΠ΅ΠΌ Group Speed Dial Π΄Π»Ρ Firefox;
- ΠΠ΅ΡΠΈΠΎΠ΄ΠΈΡΠ΅ΡΠΊΠ°Ρ Π·Π°ΠΏΠΈΡΡ ΠΆΡΡΠ½Π°Π»ΠΎΠ² ΡΠ°Π·Π»ΠΈΡΠ½ΡΠΌΠΈ ΡΠ΅ΡΠ²ΠΈΡΠ°ΠΌΠΈ ΠΎΡΡΠ»Π΅ΠΆΠΈΠ²Π°Π½ΠΈΡ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎΡΡΠΈ Π² Fedora, ΡΡΠΎ ΠΏΡΠΈΠ²ΠΎΠ΄ΠΈΠ»ΠΎ ΠΊ Π·Π°ΠΏΠΈΡΠΈ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΈΡ ΠΌΠ΅Π³Π°Π±Π°ΠΉΡ Π΄Π°Π½Π½ΡΡ Π½Π° btrfs: pmcd.service, pmie.service, pmlogger.service;
- ΠΠ³ΡΠΎΠΌΠ½Π°Ρ Π°ΠΌΠΏΠ»ΠΈΡΠΈΠΊΠ°ΡΠΈΡ ΠΏΡΠΈ Π·Π°ΠΏΠΈΡΠΈ Π½Π΅Π±ΠΎΠ»ΡΡΠΎΠ³ΠΎ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²Π° Π΄Π°Π½Π½ΡΡ ΠΏΡΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠΈ btrfs.
ΠΡΠ²ΠΎΠ΄: Π½Π΅ ΡΡΠΎΠΈΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ btrfs, Π΅ΡΠ»ΠΈ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ ΡΠ°ΡΡΠΎ Π·Π°ΠΏΠΈΡΡΠ²Π°ΡΡ Π½Π΅Π±ΠΎΠ»ΡΡΠΎΠ΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π΄Π°Π½Π½ΡΡ
(Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΊΠΈΠ»ΠΎΠ±Π°ΠΉΡ), ΠΈΠ½Π°ΡΠ΅ ΡΡΠΎ ΠΎΠ±Π΅ΡΠ½Π΅ΡΡΡ ΠΌΠ΅Π³Π°Π±Π°ΠΉΡΠ°ΠΌΠΈ Π·Π°ΠΏΠΈΡΠ°Π½Π½ΡΡ
Π΄Π°Π½Π½ΡΡ
. ΠΡΠΎΠ±Π΅Π½Π½ΠΎ Π°ΠΊΡΡΠ°Π»ΡΠ½ΠΎ Π΄Π»Ρ ΠΎΠ΄Π½ΠΎΠΏΠ»Π°ΡΠ½ΡΡ
ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠΎΠ² Ρ ΠΠ‘ Π½Π° MicroSD.
ΠΡΡΠΎΡΠ½ΠΈΠΊ: habr.com