From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Cuong Tran <cuonghuutran@gmail.com>
Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Java Stop-the-World GC stall induced by FS flush or many large file deletions
Date: Thu, 12 Sep 2013 15:46:18 +0800 [thread overview]
Message-ID: <20130912074618.GA13357@gmail.com> (raw)
In-Reply-To: <CALQm4jhE8aRjOsK2HpSuqNCzNqZm5RU9QOJi0q0SwgR=1JKZsQ@mail.gmail.com>
Hello Cuong,
Could you please tell us the kernel version? Meanwhile it would be
better if you could paste the result of the following commands:
* sudo tune2fs -l ${DEV}
* cat /proc/mounts | grep ${DEV}
I want to know which feature is enabled in your file system. From your
description, I guess delayed allocation is enabled. So I suggest that
you can try to disable it. You can disable it using the following
command:
* sudo mount -t ext4 -o remount,nodelalloc ${DEV} ${MNT}
Regards,
- Zheng
On Wed, Sep 11, 2013 at 09:17:26PM -0700, Cuong Tran wrote:
> We have seen GC stalls that are NOT due to memory usage of applications.
>
> GC log reports the CPU user and system time of GC threads, which are
> almost 0, and stop-the-world time, which can be multiple seconds. This
> indicates GC threads are waiting for IO but GC threads should be
> CPU-bound in user mode.
>
> We could reproduce the problems using a simple Java program that just
> appends to a log file via log4j. If the test just runs by itself, it
> does not incur any GC stalls. However, if we run a script that enters
> a loop to create multiple large file via falloc() and then deletes
> them, then GC stall of 1+ seconds can happen fairly predictably.
>
> We can also reproduce the problem by periodically switch the log and
> gzip the older log. IO device, a single disk drive, is overloaded by
> FS flush when this happens.
>
> Our guess is GC has to acquiesce its threads and if one of the threads
> is stuck in the kernel (say in non-interruptible mode). Then GC has to
> wait until this thread unblocks. In the mean time, it already stops
> the world.
>
> Another test that shows similar problem is doing deferred writes to
> append a file. Latency of deferred writes is very fast but once a
> while, it can last more than 1 second.
>
> We would really appreciate if you could shed some light on possible
> causes? (Threads blocked because of journal check point, delayed
> allocation can't proceed?). We could alleviate the problem by
> configuring expire_centisecs and writeback_centisecs to flush more
> frequently, and thus even-out the workload to the disk drive. But we
> would like to know if there is a methodology to model the rate of
> flush vs. rate of changes and IO throughput of the drive (SAS, 15K
> RPM).
>
> Many thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-09-12 7:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 4:17 Java Stop-the-World GC stall induced by FS flush or many large file deletions Cuong Tran
2013-09-12 5:32 ` Sidorov, Andrei
2013-09-12 5:45 ` Cuong Tran
2013-09-12 6:01 ` Sidorov, Andrei
2013-09-12 6:02 ` Sidorov, Andrei
2013-09-12 6:08 ` Cuong Tran
2013-09-12 15:47 ` Sidorov, Andrei
2013-09-12 16:58 ` Cuong Tran
2013-09-12 7:46 ` Zheng Liu [this message]
2013-09-12 11:46 ` Cuong Tran
2013-09-12 19:02 ` Theodore Ts'o
2013-09-13 15:25 ` Cuong Tran
2013-09-13 18:36 ` Theodore Ts'o
2013-09-14 18:47 ` Cuong Tran
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=20130912074618.GA13357@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=cuonghuutran@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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