Ищется любая б-м внятная информация по поводу Linux, VmWare, «Involuntary context switches» и настроек производительности.
Суть проблемы: есть несколько линуксовых машин Centos 6.6 x64 в вмварной виртуалке, есть некий скрипт который делает grep по текстовому файлу, ранее работавший на физической машине. После запуска его на одной из виртуальных Centos были замечены чудовищные тормоза.
По разбирательству было установлено что:
1. тормоза происходят от команды grep -i. Просто grep выполняется моментально, grep -i на того же размера файле, в той же системе проходит за 30+ секунд.
2. ситуация воспроизвелась на других виртуалках той же фермы. На личной машине с вмварью, на опенстековской виртуалке - все ок, скорость выполнения практически одинакова, как и должно быть.
3. /usr/bin/time grep/grep -i выдает следующий расклад (см ниже) где заметно выделяются показания счетчика «Involuntary context switches», и это навевает мысль что оно как-то с чем-то связано.
Ситуация откровенно странная, встречается впервые, гугление толком результатов не дало, и соответственно есть вопрос: встречался ли кто с подобным? где вообще можно нарыть хорошей инфы по симптому Involuntary context switches, настройках ядра для его минимизации итд итп...
Заранее всем огромный спасиб.
Command being timed: «grep -i jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 33.18
System time (seconds): 0.21
Percent of CPU this job got: 94%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:35.22
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3424
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 249
Voluntary context switches: 1
Involuntary context switches: 3792
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
Command exited with non-zero status 1
Command being timed: «grep -i jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 35.48
System time (seconds): 0.21
Percent of CPU this job got: 92%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:38.43
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3424
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 249
Voluntary context switches: 1
Involuntary context switches: 4548
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
Command exited with non-zero status 1
Command being timed: «grep jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 0.09
System time (seconds): 0.10
Percent of CPU this job got: 91%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.22
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3344
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 245
Voluntary context switches: 2
Involuntary context switches: 27
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
exited with non-zero status 1
Command being timed: «grep jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 0.08
System time (seconds): 0.12
Percent of CPU this job got: 49%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.42
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3344
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 247
Voluntary context switches: 9
Involuntary context switches: 29
Swaps: 0
File system inputs: 96
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
Command exited with non-zero status 1
Command being timed: «grep -i jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 37.48
System time (seconds): 0.34
Percent of CPU this job got: 86%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:43.81
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3280
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 249
Voluntary context switches: 430
Involuntary context switches: 5303
Swaps: 0
File system inputs: 12368
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
Command exited with non-zero status 1
Command being timed: «grep -i jrthfDSFDSFSDdsdsw test.log»
User time (seconds): 34.37
System time (seconds): 0.58
Percent of CPU this job got: 77%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:45.22
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3424
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 4
Minor (reclaiming a frame) page faults: 248
Voluntary context switches: 1010
Involuntary context switches: 9174
Swaps: 0
File system inputs: 139440
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1