You are not logged in.

#26 2016-03-04 13:26:26

lkollenberger
Member
Registered: 2015-11-25
Posts: 6

Re: kswapd0 using 100% cpu on one core for no obvious reason

Linux-mainline 4.5.0-rc6 seems not affected. Will report back after a couple of days of regular work.

Offline

#27 2016-03-10 23:12:39

veyen
Member
Registered: 2013-11-20
Posts: 5

Re: kswapd0 using 100% cpu on one core for no obvious reason

Here is another upstream bug report to follow:

https://bugzilla.kernel.org/show_bug.cgi?id=65201

Another proposed workaround by cdlscpmv:

cdlscpmv 2016-03-08 04:28:41 UTC

Good news! I was able to get rid of the bug completely by setting the `mem` kernel parameter to a value slightly less than physical memory. I own an Acer C720 (2GB model), and setting `mem=1920M` does the job.

The idea sprung up in my head after reading the aforementioned bug report on github[1]. I hope this might give some clue to the issue.

[1]: https://github.com/GalliumOS/galliumos-distro/issues/52

Last edited by veyen (2016-03-10 23:12:52)

Offline

#28 2016-04-12 10:20:33

veyen
Member
Registered: 2013-11-20
Posts: 5

Re: kswapd0 using 100% cpu on one core for no obvious reason

I'm just reporting back to confirm that the workarounds proposed DO NOT solve the issue.

It seems like the workarounds proposed helped since it happens less often, but it's hard to quantitatively prove due to the random nature of the bug.

Best bet for all afflicted right now is LTS kernel.

Offline

#29 2016-04-15 08:49:38

jacky_lau
Member
Registered: 2016-03-10
Posts: 4

Re: kswapd0 using 100% cpu on one core for no obvious reason

The newest kernel 4.5 has the same bug.
I has an asus notebook whit Intel Celeron 847 and 2GB RAM.
I'm using arch linux with kernel 4.5, and when I rebuild the kernel with makepkg command, kswapd0 uses 100% of one core after few minutes.

[jacky@arch ~/my-abs/linux]$ uname -a
Linux arch 4.5.0-1-ARCH #1 SMP PREEMPT Tue Mar 15 09:41:03 CET 2016 x86_64 GNU/Linux

[jacky@arch ~/my-abs/linux]$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Celeron(R) CPU 847 @ 1.10GHz
stepping        : 7
microcode       : 0x28
cpu MHz         : 1003.363
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts
bugs            :
bogomips        : 2195.32
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Celeron(R) CPU 847 @ 1.10GHz
stepping        : 7
microcode       : 0x28
cpu MHz         : 1099.441
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts
bugs            :
bogomips        : 2195.32
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

[jacky@arch ~/my-abs/linux]$ cat /proc/meminfo 
MemTotal:        1866056 kB
MemFree:         1393100 kB
MemAvailable:    1406552 kB
Buffers:            2088 kB
Cached:           366992 kB
SwapCached:           20 kB
Active:           329656 kB
Inactive:          67596 kB
Active(anon):      28356 kB
Inactive(anon):      772 kB
Active(file):     301300 kB
Inactive(file):    66824 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1952764 kB
SwapFree:        1952744 kB
Dirty:               432 kB
Writeback:            16 kB
AnonPages:         28008 kB
Mapped:            31300 kB
Shmem:              1072 kB
Slab:              39052 kB
SReclaimable:      25968 kB
SUnreclaim:        13084 kB
KernelStack:        1904 kB
PageTables:         2140 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2885792 kB
Committed_AS:      41356 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       63484 kB
DirectMap2M:     1914880 kB

[jacky@arch ~/my-abs/linux]$ cat /proc/vmstat 
nr_free_pages 350020
nr_alloc_batch 2264
nr_inactive_anon 193
nr_active_anon 6182
nr_inactive_file 15897
nr_active_file 75239
nr_unevictable 0
nr_mlock 0
nr_anon_pages 6095
nr_mapped 7222
nr_file_pages 91338
nr_dirty 104
nr_writeback 4
nr_slab_reclaimable 6486
nr_slab_unreclaimable 3279
nr_page_table_pages 531
nr_kernel_stack 121
nr_unstable 0
nr_bounce 0
nr_vmscan_write 5
nr_vmscan_immediate_reclaim 0
nr_writeback_temp 0
nr_isolated_anon 0
nr_isolated_file 0
nr_shmem 268
nr_dirtied 576264
nr_written 524967
nr_pages_scanned 0
numa_hit 44485734
numa_miss 0
numa_foreign 0
numa_interleave 155
numa_local 44485734
numa_other 0
workingset_refault 7
workingset_activate 6
workingset_nodereclaim 0
nr_anon_transparent_hugepages 0
nr_free_cma 0
nr_dirty_threshold 78040
nr_dirty_background_threshold 39020
pgpgin 33584586
pgpgout 1429256
pswpin 0
pswpout 5
pgalloc_dma 267118
pgalloc_dma32 46633102
pgalloc_normal 334
pgalloc_movable 0
pgfree 47250823
pgactivate 178318
pgdeactivate 1217
pgfault 37485269
pgmajfault 393969
pglazyfreed 0
pgrefill_dma 604
pgrefill_dma32 32
pgrefill_normal 0
pgrefill_movable 0
pgsteal_kswapd_dma 176
pgsteal_kswapd_dma32 14
pgsteal_kswapd_normal 0
pgsteal_kswapd_movable 0
pgsteal_direct_dma 0
pgsteal_direct_dma32 0
pgsteal_direct_normal 0
pgsteal_direct_movable 0
pgscan_kswapd_dma 186
pgscan_kswapd_dma32 48
pgscan_kswapd_normal 0
pgscan_kswapd_movable 0
pgscan_direct_dma 0
pgscan_direct_dma32 0
pgscan_direct_normal 0
pgscan_direct_movable 0
pgscan_direct_throttle 0
zone_reclaim_failed 0
pginodesteal 0
slabs_scanned 160050833624
kswapd_inodesteal 10033768
kswapd_low_wmark_hit_quickly 0
kswapd_high_wmark_hit_quickly 6448932
pageoutrun 6448934
allocstall 0
pgrotated 253684
drop_pagecache 0
drop_slab 0
numa_pte_updates 0
numa_huge_pte_updates 0
numa_hint_faults 0
numa_hint_faults_local 0
numa_pages_migrated 0
pgmigrate_success 0
pgmigrate_fail 0
compact_migrate_scanned 0
compact_free_scanned 0
compact_isolated 0
compact_stall 0
compact_fail 0
compact_success 0
htlb_buddy_alloc_success 0
htlb_buddy_alloc_fail 0
unevictable_pgs_culled 0
unevictable_pgs_scanned 0
unevictable_pgs_rescued 0
unevictable_pgs_mlocked 0
unevictable_pgs_munlocked 0
unevictable_pgs_cleared 0
unevictable_pgs_stranded 0
thp_fault_alloc 1956
thp_fault_fallback 0
thp_collapse_alloc 2224
thp_collapse_alloc_failed 0
thp_split_page 3
thp_split_page_failed 57271
thp_split_pmd 12
thp_zero_page_alloc 1
thp_zero_page_alloc_failed 0
balloon_inflate 0
balloon_deflate 0
balloon_migrate 0

[jacky@arch ~/my-abs/linux]$ cat /proc/swaps 
Filename                                Type            Size    Used    Priority
/dev/sda8                               partition       1952764 20      -1


[jacky@arch ~/my-abs/linux]$ free
              total        used        free      shared  buff/cache   available
Mem:        1866056       62376     1399704        1072      403976     1409116
Swap:       1952764          20     1952744
 

Last edited by jacky_lau (2016-04-19 04:18:57)

Offline

#30 2016-04-15 09:22:55

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: kswapd0 using 100% cpu on one core for no obvious reason

Please edit your post to include code tags around the terminal output.

https://wiki.archlinux.org/index.php/Fo … s_and_code


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#31 2016-04-26 05:59:13

tybo
Member
Registered: 2012-05-03
Posts: 21

Re: kswapd0 using 100% cpu on one core for no obvious reason

Hello,

Same thing here with Celeron 847 as well. This problem also seems to happen with the lts kernel (4.4.8), so not much luck over there.

Offline

#32 2016-10-31 04:06:26

youngian
Member
Registered: 2012-08-06
Posts: 26

Re: kswapd0 using 100% cpu on one core for no obvious reason

I hope it's not too rude to revive this old thread, but hopefully this might help out anyone else having problems recently. I encountered this exact problem on the recent 4.8.4-1 kernel. I also tried linux-ck (4.8.4-3) as that gets mentioned in some chatter about this bug, and still had the same problem. For now I've resolved it by switching to linux-lts (4.4.27-1) which does not exhibit the problem for me. The /proc/sys/vm/drop_caches workarounds seemed to have no effect for me.

Offline

#33 2016-10-31 10:23:57

sender
Member
Registered: 2014-07-20
Posts: 34

Re: kswapd0 using 100% cpu on one core for no obvious reason

Been pestered by this bug for quite some years. The only thing that worked for me is setting up a swapfile (https://wiki.archlinux.org/index.php/Swap#systemd-swap)


XPS 13 9350 / i7-6560U / 16GB / 1T NVMe / QHD+ / Iris 540 / Intel 7265D / linux4.8

Offline

#34 2017-01-03 08:41:09

wipu
Member
Registered: 2017-01-03
Posts: 1

Re: kswapd0 using 100% cpu on one core for no obvious reason

I'm on 4.8.13-100.fc23.i686+PAE.
kswapd0 uses up very much time when I read from internal SSD (no mounts) with e.g. dd if=/dev/sda of=/dev/null .
kswapd0 stops after stop reading.

Reading from USB-harddisk /dev/sdb raises no problem.

This problem occurs independend of swapon/swapoff, swappiness and memory usage.
memtest86+-5.01-1 shows no memory problem after 5 minutes run.
SSD-SATA Problem?

Last edited by wipu (2017-01-03 08:46:18)

Offline

#35 2017-08-07 10:26:47

lexikon
Member
Registered: 2017-01-15
Posts: 10

Re: kswapd0 using 100% cpu on one core for no obvious reason

Hello...on my system I has this trouble
Asus N550-jv, kernel 4.12, 16Gb Ram + SSD, no swap...when I start multiple big application - my system get freezes (100% cpu kwapd0)
How fix it? Turn On swap?

Last edited by lexikon (2017-08-07 10:27:11)

Offline

Board footer

Powered by FluxBB