Salut a tous,
J'ai quelques soucis de lenteur sur le serveur que j'ai a la maison (HP MicroServer Gen 8), alors du coup j'ai essaye de voir ce qui l'occupe tellement. J'ai recupere des sorties de commandes mais je n'arrive pas bien a interpreter les resultats, je me tourne donc vers vous pour voir si vous pouvez m'eclairer.
Le serveur dispose de 4 disques dur en raid5. Il fait tourner une machine virtuelle (libvirt/qemu) dans laquelle j'ai installe une seedbox grace a docker (donc plusieurs images docker avec tous les outils necessaires pour automatiser le telechargements de media).
La sortie de la commande top :
top - 11:50:03 up 23:59, 1 user, load average: 16,33, 16,59, 16,15
Tasks: 246 total, 2 running, 244 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0,7 us, 0,3 sy, 0,0 ni, 0,0 id, 98,9 wa, 0,0 hi, 0,1 si, 0,0 st
KiB Mem: 8152216 total, 8020528 used, 131688 free, 432464 buffers
KiB Swap: 7811068 total, 0 used, 7811068 free. 3780036 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1930 libvirt+ 20 0 5817788 3,052g 10224 S 5,6 39,3 408:19.69 qemu-system-x86
1932 root 20 0 0 0 0 S 1,0 0,0 60:29.02 vhost-1930
45533 driss 20 0 27972 3044 2408 R 0,7 0,0 0:00.02 top
151 root 0 -20 0 0 0 R 0,3 0,0 1:03.26 kworker/0:1H
1 root 20 0 30320 6164 3096 S 0,0 0,1 0:02.41 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.08 kthreadd
3 root 20 0 0 0 0 S 0,0 0,0 3:56.22 ksoftirqd/0
5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:0H
Ce qui m'inquiete c'est le load average et le 98,9 de wa. Je sais pas si c'est normal que ca monte si haut.
Pour voir les iowait :
$ iostat
Linux 3.16.0-4-amd64 (server) 05/03/2017 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
6,20 0,00 2,22 35,71 0,00 55,87
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 15,71 1204,36 440,26 104066046 38041947
sdc 15,46 1207,41 439,44 104329781 37970699
sdd 16,40 1214,92 453,82 104978403 39213451
sda 14,37 1201,05 448,23 103780236 38730343
md0 0,01 0,03 0,00 2337 12
md1 6,16 27,22 44,27 2352439 3825480
md2 17,77 1995,52 984,92 172428185 85104420
dm-0 6,16 27,22 44,27 2351738 3825480
dm-1 0,07 0,72 0,04 62097 3428
dm-2 0,01 0,02 0,00 2117 32
dm-3 0,02 0,04 0,04 3721 3128
dm-4 0,02 0,07 0,00 5773 12
dm-5 0,22 2,46 0,11 212740 9900
dm-6 0,04 0,02 0,14 2072 12224
dm-7 1,22 0,53 5,49 45724 474804
dm-8 0,01 0,02 0,00 2068 0
dm-9 4,33 23,28 38,44 2011997 3321940
dm-10 0,01 0,03 0,00 2629 12
dm-11 17,76 1995,51 984,94 172427458 85106068
dm-12 1,07 303,12 11,45 26191921 989584
dm-13 16,36 1692,33 973,48 146230869 84116224
dm-14 0,01 0,03 0,00 2500 48
dm-15 0,01 0,02 0,00 1572 212
sde 0,12 0,60 0,00 51812 412
sdf 0,12 0,56 0,00 47972 416
sdg 0,03 0,18 0,00 15123 32
La je sais pas vraiment interpreter le resultat (c'est ok, pas ok?).
Parmi les 4 disques celui semble ne pas aller tres bien :
# smartctl -a /dev/sdc
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: ST6000VN0011-1UL17Z
Serial Number: Z4D3VL6G
LU WWN Device Id: 5 000c50 090a44602
Firmware Version: AN02
User Capacity: 6 001 175 126 016 bytes [6,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 3b
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is: Sun Mar 5 11:52:46 2017 EET
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: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
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: ( 584) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 641) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x10bd) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 076 063 006 Pre-fail Always - 47783400
3 Spin_Up_Time 0x0003 097 086 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 098 098 020 Old_age Always - 2597
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 078 060 030 Pre-fail Always - 59718064
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 964
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 098 098 020 Old_age Always - 2609
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 062 054 040 Old_age Always - 38 (Min/Max 38/38)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 2415
193 Load_Cycle_Count 0x0032 099 099 000 Old_age Always - 2641
194 Temperature_Celsius 0x0022 038 046 000 Old_age Always - 38 (0 23 0 0 0)
195 Hardware_ECC_Recovered 0x001a 014 011 000 Old_age Always - 47783400
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 954 (45 159 0)
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 13069375157
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 16900085790
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 946 -
# 2 Short offline Completed without error 00% 106 -
# 3 Short offline Completed without error 00% 16 -
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.
Le "Raw_Read_Error_Rate" et "Seek_Error_Rate" me paraissent pas bon du tout. Est-ce que je dois me faire du soucis?
# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md2 : active raid5 sdd4[0] sda4[4] sdb4[2] sdc4[1]
16106075136 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
[>....................] check = 1.2% (67465956/5368691712) finish=94417.4min speed=935K/sec
bitmap: 0/40 pages [0KB], 65536KB chunk
md1 : active raid1 sdd3[0] sda3[3] sdb3[2] sdc3[1]
488150016 blocks super 1.2 [4/4] [UUUU]
resync=DELAYED
bitmap: 1/4 pages [4KB], 65536KB chunk
md0 : active raid1 sdd2[4] sda2[3] sdb2[2] sdc2[1]
2927616 blocks super 1.2 [4/4] [UUUU]
unused devices: <none>
Et la c'est la cata, il est en train de faire un truc sur le raid5 qui prend 94417 minutes (65 jours!!!).
J'avais mis en place ce serveur justement pour l'utiliser en tant que seedbox, mais j'ai prefere faire ca dans une vm pour pouvoir plus facilement la sauvegarder et j'ai utilise docker parce que ca permet d'eviter tout les problemes de dependances. Mais la j'ai l'impression que c'est justement la vm seedbox qui est en train de rendre le serveur inutilisable (avant je pouvais lire une video HD depuis le serveur au travers de samba, mais maintenant ca bloque tous les 20 secondes).
Une idee pour que je comprennes mieux ce qui se passe?