From: NeilBrown <neilb@suse.de>
To: "Artem S. Tashkinov" <t.artem@lycos.com>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
linux-fsdevel@vger.kernel.org, axboe@kernel.dk,
linux-mm@kvack.org
Subject: Re: Disabling in-memory write cache for x86-64 in Linux II
Date: Fri, 25 Oct 2013 21:49:52 +1100 [thread overview]
Message-ID: <20131025214952.3eb41201@notabene.brown> (raw)
In-Reply-To: <160824051.3072.1382685914055.JavaMail.mail@webmail07>
[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]
On Fri, 25 Oct 2013 07:25:13 +0000 (UTC) "Artem S. Tashkinov"
<t.artem@lycos.com> wrote:
> Hello!
>
> On my x86-64 PC (Intel Core i5 2500, 16GB RAM), I have the same 3.11 kernel
> built for the i686 (with PAE) and x86-64 architectures. What's really troubling me
> is that the x86-64 kernel has the following problem:
>
> When I copy large files to any storage device, be it my HDD with ext4 partitions
> or flash drive with FAT32 partitions, the kernel first caches them in memory entirely
> then flushes them some time later (quite unpredictably though) or immediately upon
> invoking "sync".
>
> How can I disable this memory cache altogether (or at least minimize caching)? When
> running the i686 kernel with the same configuration I don't observe this effect - files get
> written out almost immediately (for instance "sync" takes less than a second, whereas
> on x86-64 it can take a dozen of _minutes_ depending on a file size and storage
> performance).
What exactly is bothering you about this? The amount of memory used or the
time until data is flushed?
If the later, then /proc/sys/vm/dirty_expire_centisecs is where you want to
look.
This defaults to 30 seconds (3000 centisecs).
You could make it smaller (providing you also shrink
dirty_writeback_centisecs in a similar ratio) and the VM will flush out data
more quickly.
NeilBrown
>
> I'm _not_ talking about disabling write cache on my storage itself (hdparm -W 0 /dev/XXX)
> - firstly this command is detrimental to the performance of my PC, secondly, it won't help
> in this instance.
>
> Swap is totally disabled, usually my memory is entirely free.
>
> My kernel configuration can be fetched here: https://bugzilla.kernel.org/show_bug.cgi?id=63531
>
> Please, advise.
>
> Best regards,
>
> Artem
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-10-25 10:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 7:25 Disabling in-memory write cache for x86-64 in Linux II Artem S. Tashkinov
2013-10-25 8:18 ` Linus Torvalds
2013-11-05 0:50 ` Andreas Dilger
2013-11-05 4:12 ` Dave Chinner
2013-11-07 13:48 ` Jan Kara
2013-11-11 3:22 ` Dave Chinner
2013-11-11 19:31 ` Jan Kara
2013-11-05 6:32 ` Figo.zhang
2013-10-25 10:49 ` NeilBrown [this message]
2013-10-25 11:26 ` David Lang
2013-10-25 18:26 ` Artem S. Tashkinov
2013-10-25 19:40 ` Diego Calleja
2013-10-25 23:32 ` Fengguang Wu
2013-11-15 15:48 ` Diego Calleja
2013-10-25 20:43 ` NeilBrown
2013-10-25 21:03 ` Artem S. Tashkinov
2013-10-25 22:11 ` NeilBrown
2013-11-05 1:40 ` Figo.zhang
2013-11-05 1:47 ` David Lang
2013-11-05 2:08 ` NeilBrown
2013-10-29 20:49 ` Jan Kara
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=20131025214952.3eb41201@notabene.brown \
--to=neilb@suse.de \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=t.artem@lycos.com \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).