From: danielhilst@gmail.com (Daniel Hilst Selli)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Can small writes generate a lot of faults?
Date: Tue, 23 Apr 2013 12:19:17 -0300 [thread overview]
Message-ID: <5176A675.8080108@gmail.com> (raw)
In-Reply-To: <c0b1fe30-de1f-465c-9df3-3922ee03876f@email.android.com>
Em 22/04/2013 10:20, Greg Freemyer escreveu:
>
> Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
>
>> Hi :)
>>
>> On Sat, Apr 20, 2013 at 4:42 AM, Daniel Hilst Selli
>> <danielhilst@gmail.com> wrote:
>>> AFAIK, major page faults are generated when data that is not yet
>> present
>>> on RAM is loaded from disk, but in this case data is being write do
>>> disk, I can't
>>> see how writes can generate faults, but still, it seems that is
>>> happening, ... !?
>>>
>>> Is that possible?
>> I never pay close attention on these kind of stuffs, but IMHO there is
>> a chance that this "write" is actually "update"
> I missed the original email, but the kernel filesystem logic typically works with 4 KB pages. If a write lands on page boundaries then the file system will do pure writes, but if it doesn't then the filesystem will typically read the original page from disk then update it and write it back out.
>
> Small writes of 4 kb as an example that are not page aligned will cause 2 pages to read, both to be updated and both to be written.
>
> Adding raid 5/6 below the file system layer greatly accelerates the problem. Now you need to ensure your writes are the full size of a stripe and stripe aligned to avoid the read/update/write sequence. Some filesystems build knowledge of stripes into them to try and optimize this process, some don't.
>
> Greg
>
>
>
Thanks for your answer Greg, I have never been presented to this
"read/update/write" logic, now makes a lot of sens, Thanks!
next prev parent reply other threads:[~2013-04-23 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 21:42 Can small writes generate a lot of faults? Daniel Hilst Selli
2013-04-21 21:53 ` Gaurav Jain
2013-04-22 3:55 ` Mulyadi Santosa
2013-04-22 13:20 ` Greg Freemyer
2013-04-23 15:19 ` Daniel Hilst Selli [this message]
[not found] ` <9358EF77-C6D9-495B-93DE-89994A121517@oetiker.ch>
2013-04-23 15:53 ` [rrd-users] " Daniel Hilst Selli
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=5176A675.8080108@gmail.com \
--to=danielhilst@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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).