From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: folkert <folkert@vanheusden.com>
Cc: udovdh@xs4all.nl, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: f2fs using tons of cpu
Date: Thu, 10 Oct 2013 09:28:40 +0900 [thread overview]
Message-ID: <1381364920.992.15.camel@kjgkr> (raw)
In-Reply-To: <20131008112534.GA24963@belle.intranet.vanheusden.com>
Hi,
2013-10-08 (화), 13:25 +0200, folkert:
> Hi,
>
> For the last few days f2fs started to use loads of cpu on one of my
> raspberry pi systems:
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 2822 root 20 0 0 0 0 R 35.3 0.0 328:34.01 f2fs_gc-254:0
> 2826 root 20 0 0 0 0 R 35.3 0.0 327:40.07 flush-254:0
The f2fs_gc is a kernel thread conducting on-line defragementation.
The period between each triggers is dependant on the system idling time,
ranging from 30 to 60 secs by default.
In order to control these times, you can use sysfs enabled by the
following patch that was merged into 3.12-rc1.
commit d2dc095f4280ad5fdea33769e8e119fd16648426 f2fs: add sysfs entries
to select the gc policy
commit b59d0bae6ca30c496f298881616258f9cde0d9c6 f2fs: add sysfs support
for controlling the gc_thread
> This is continuous load, the whole day.
Right. It runs until there is no fragmentation.
> This is to a SSD connected via USB:
> Bus 001 Device 025: ID 0c45:7401 Microdia
> The SSD does not support trim (that's why I put f2fs on it).
>
> It is constantly reading (and not writing) data from the SSD it is on:
The f2fs_gc just loads a bunch of victim blocks from the disk to
in-memory cache first.
Afterwards, it writes cached blocks by the write-back mechanism in VFS
according to the system status.
>
> folkert@vnvnation ~ $ vmstat 2
> procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
> r b swpd free buff cache si so bi bo in cs us sy id wa
> 2 0 0 20744 16 375052 0 0 305774 0 413 157 0 100 0 0
> 2 0 0 20744 16 375052 0 0 304272 0 409 151 0 100 0 0
> 2 0 0 21536 16 375052 0 0 301444 0 410 163 0 100 0 0
> 2 0 0 21536 16 375052 0 0 305052 0 408 150 0 100 0 0
> 2 0 0 21536 16 375052 0 0 302994 0 407 151 0 100 0 0
> 2 0 0 21932 16 375052 0 0 303408 0 406 153 0 100 0 0
> 2 0 0 21932 16 375052 0 0 301580 0 417 152 1 99 0 0
> 2 0 0 21932 16 375052 0 0 304142 0 411 150 0 100 0 0
> 2 0 0 21932 16 375052 0 0 305944 0 409 152 0 100 0 0
> 2 0 0 21932 16 375052 0 0 299700 0 414 156 0 100 0 0
>
> It has lots of free diskspace left:
You'd better keep track on /sys/kernel/debug/f2fs/status, and I think
you can find many dirty segments across the partition.
In the status file, you can also see the f2fs_gc behavior.
Thanks,
>
> folkert@vnvnation ~ $ df -h /home/folkert/backups
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/backups 118G 91G 27G 78% /home/folkert/backups
>
> Kernel:
>
> folkert@vnvnation ~ $ uname -r
> 3.9.8+
>
>
> Folkert van Heusden
>
--
Jaegeuk Kim
Samsung
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2013-10-10 0:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 11:25 f2fs using tons of cpu folkert
2013-10-10 0:28 ` Jaegeuk Kim [this message]
2013-11-09 17:29 ` folkert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381364920.992.15.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=folkert@vanheusden.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=udovdh@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).