From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ADD9C138334 for ; Sun, 10 Jun 2018 18:19:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF01CE08ED; Sun, 10 Jun 2018 18:18:52 +0000 (UTC) Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B967CE01B5 for ; Sun, 10 Jun 2018 18:18:51 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id o9-v6so27224240lfk.1 for ; Sun, 10 Jun 2018 11:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7u28UpsvT5EuWt+pviAG8tqWztKIKjSTSW+dGeNZ7Jc=; b=H6rZtVJ7EJzRpbP11HFZKRqK4ASjsuisRkHTWUTEX0tDZOfSg0FLT+H4ZUR+wExNJH 4h0Zcup/aW+fYDKpGccyFLOOyk74i/55EnP6uk3+C6M61jbQsvOxq3B0x0kBRVVnmW51 rq477n8gjHow83XBfrtPAnbPEqgougcbUha2vDIYiQiK4bSCoc7f2uRdQiQHFXwn96rA OZswCeKoWZ/LzeNBAuN8gUFoHj7NQjUlhuOfmw2Rt3ZDpFOdq2XFK8eKYltExvM9KKwA e0RzGL+0JAkvvigkegu5a8vsvgALQjvgmyQww8yFaB1jMjPQzMKWbhI3zYlrvLiF2+CQ Sc+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7u28UpsvT5EuWt+pviAG8tqWztKIKjSTSW+dGeNZ7Jc=; b=V8myQQJ1XvjDUZb5Xum94ZyHI/rNInE7kg68Dq/C/IT1Mw5GIisl+/WCAvC8VOXS/f +cPb2qTsCPOSUS4BnWOPCG46KCJJ4KU74bwgge078mlbHNhkKJOxc/SToI+vKVoVUCgS BGi7GusgMnib/9PyGoOJqC9gVkd1FeYoWLzNvY22Cdxxu3ePn5dHNyAKA8orXoTVKqeY ETom19k5g93Nd3zOMIIt7gwzSMwi16nxDiorPhlbEDWNnTStYtWbvA2pFG+zWYdYS+ur ruwW/y/8vmpObcdA8piDQPDCunRESbVYuZ8KzY/196SQudeZMrBrmBEM6cXyW2jaSJPc n2gw== X-Gm-Message-State: APt69E0BTwfBs22ICrXN6sO5HkaxM+ATDywEuURIoRtC9cdQbZdCcvfC FICUOmmzvDQpAWq5GG0DiNKGh1ty7K0xfFietTtC7Q== X-Google-Smtp-Source: ADUXVKKnEZgbftAP8Z7m1m1R5Xe3f+JQT0jIx6dt1h2WLe9BYbGTrrjw0g4fl1KW71dtVhg6cEhMwFWoH/ciFHWbltU= X-Received: by 2002:a2e:2ac3:: with SMTP id q186-v6mr10032947ljq.44.1528654729948; Sun, 10 Jun 2018 11:18:49 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 2002:a2e:638a:0:0:0:0:0 with HTTP; Sun, 10 Jun 2018 11:18:49 -0700 (PDT) In-Reply-To: References: From: chin chong Date: Sun, 10 Jun 2018 21:18:49 +0300 Message-ID: Subject: Re: [gentoo-user] kswapd0 100% CPU with swapoff and no memory demands on system To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary="00000000000029b135056e4daad7" X-Archives-Salt: 5ba91ad1-25cf-4fb7-a7e2-fe1727d07609 X-Archives-Hash: 3b245c1c40064b0920927262f93a23d1 --00000000000029b135056e4daad7 Content-Type: text/plain; charset="UTF-8" unsubscribe On Sat, May 3, 2014 at 10:16 AM, Chris Stankevitz wrote: > Hello, > > I have a small system: > > - 6GB drive > > - ext4 partition mounted readonly > > - swap partition that is not listed in fstab and not enabled. (I will > swapon it every few weeks or so if I need it for a large compile job) > > - 2 GB RAM > > When the system boots it processing video from a USB camera. The > program dynamically allocates and releases memory while it runs, but > stores no data in memory or on disk (read-only). The memory usage > does not grow over time. > > When things are going well, top looks like so: > > === > > Tasks: 68 total, 1 running, 67 sleeping, 0 stopped, 0 zombie > %Cpu0 : 88.3 us, 11.7 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu1 : 25.5 us, 2.3 sy, 0.0 ni, 72.1 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu2 : 6.0 us, 0.7 sy, 0.0 ni, 93.3 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu3 : 25.7 us, 2.3 sy, 0.0 ni, 72.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > KiB Mem: 1861644 total, 161648 used, 1699996 free, 6948 buffers > KiB Swap: 0 total, 0 used, 0 free, 57728 cached > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 2129 root 20 0 1774440 81712 25388 S 160.0 4.4 25:55.46 obt > 705 root 20 0 0 0 0 S 1.0 0.0 0:07.87 kswapd0 > 2049 ueyed 20 0 620472 14092 13652 S 1.0 0.8 0:09.34 > ueyeusbd > > > ==== > > > Q1: Why does the kswapd0 process from time to time take up 100% CPU? > > Q2: Why does top show "cached swap" eventhough I do not have swap mounted? > > Q3: Is there anything I can do to prevent kswapd0 from using CPU on my > system? e.g. disable SWAP in the kernel config > > I suspect the answer to Q1 is: > > a) kernel is not configured properly for my hardware > or > b) there is some bad side effect to my readonly root fs > > Thank you, > > Chris > > --00000000000029b135056e4daad7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
unsubscribe

On Sat, May 3, 2014 at 10:16 AM, Chris Stankevitz <chrisstankevitz@gmail.com> wrote:
Hello,

I have a small system:

- 6GB drive

- ext4 partition mounted readonly

- swap partition that is not listed in fstab and not enabled.=C2=A0 (I will=
swapon it every few weeks or so if I need it for a large compile job)

- 2 GB RAM

When the system boots it processing video from a USB camera.=C2=A0 The
program dynamically allocates and releases memory while it runs, but
stores no data in memory or on disk (read-only).=C2=A0 The memory usage
does not grow over time.

When things are going well, top looks like so:

=3D=3D=3D

Tasks:=C2=A0 68 total,=C2=A0 =C2=A01 running,=C2=A0 67 sleeping,=C2=A0 =C2= =A00 stopped,=C2=A0 =C2=A00 zombie
%Cpu0=C2=A0 : 88.3 us, 11.7 sy,=C2=A0 0.0 ni,=C2=A0 0.0 id,=C2=A0 0.0 wa,= =C2=A0 0.0 hi,=C2=A0 0.0 si,=C2=A0 0.0 st
%Cpu1=C2=A0 : 25.5 us,=C2=A0 2.3 sy,=C2=A0 0.0 ni, 72.1 id,=C2=A0 0.0 wa,= =C2=A0 0.0 hi,=C2=A0 0.0 si,=C2=A0 0.0 st
%Cpu2=C2=A0 :=C2=A0 6.0 us,=C2=A0 0.7 sy,=C2=A0 0.0 ni, 93.3 id,=C2=A0 0.0 = wa,=C2=A0 0.0 hi,=C2=A0 0.0 si,=C2=A0 0.0 st
%Cpu3=C2=A0 : 25.7 us,=C2=A0 2.3 sy,=C2=A0 0.0 ni, 72.0 id,=C2=A0 0.0 wa,= =C2=A0 0.0 hi,=C2=A0 0.0 si,=C2=A0 0.0 st
KiB Mem:=C2=A0 =C2=A01861644 total,=C2=A0 =C2=A0161648 used,=C2=A0 1699996 = free,=C2=A0 =C2=A0 =C2=A06948 buffers
KiB Swap:=C2=A0 =C2=A0 =C2=A0 =C2=A0 0 total,=C2=A0 =C2=A0 =C2=A0 =C2=A0 0 = used,=C2=A0 =C2=A0 =C2=A0 =C2=A0 0 free,=C2=A0 =C2=A0 57728 cached

=C2=A0 PID USER=C2=A0 =C2=A0 =C2=A0 PR=C2=A0 NI=C2=A0 =C2=A0 VIRT=C2=A0 =C2= =A0 RES=C2=A0 =C2=A0 SHR S=C2=A0 %CPU %MEM=C2=A0 =C2=A0 =C2=A0TIME+ COMMAND=
=C2=A02129 root=C2=A0 =C2=A0 =C2=A0 20=C2=A0 =C2=A00 1774440=C2=A0 81712=C2= =A0 25388 S 160.0=C2=A0 4.4=C2=A0 25:55.46 obt
=C2=A0 705 root=C2=A0 =C2=A0 =C2=A0 20=C2=A0 =C2=A00=C2=A0 =C2=A0 =C2=A0 = =C2=A00=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0 S=C2=A0 =C2=A01.0=C2=A0= 0.0=C2=A0 =C2=A00:07.87 kswapd0
=C2=A02049 ueyed=C2=A0 =C2=A0 =C2=A020=C2=A0 =C2=A00=C2=A0 620472=C2=A0 140= 92=C2=A0 13652 S=C2=A0 =C2=A01.0=C2=A0 0.8=C2=A0 =C2=A00:09.34 ueyeusbd


=3D=3D=3D=3D


Q1: Why does the kswapd0 process from time to time take up 100% CPU?

Q2: Why does top show "cached swap" eventhough I do not have swap= mounted?

Q3: Is there anything I can do to prevent kswapd0 from using CPU on my
system?=C2=A0 e.g. disable SWAP in the kernel config

I suspect the answer to Q1 is:

a) kernel is not configured properly for my hardware
=C2=A0or
b) there is some bad side effect to my readonly root fs

Thank you,

Chris


--00000000000029b135056e4daad7--