Why is most the of disk IO attributed to jbd2 and not to the process that is actually using the IO?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












14















When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why?



Here's iotop's example output (other processes with IO<1% omitted):



enter image description here










share|improve this question
























  • Is this with data=journal?

    – DepressedDaniel
    Feb 9 '17 at 0:00











  • @DepressedDaniel not sure what you mean. I just used iotop -oP

    – Sparkler
    Feb 9 '17 at 0:01















14















When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why?



Here's iotop's example output (other processes with IO<1% omitted):



enter image description here










share|improve this question
























  • Is this with data=journal?

    – DepressedDaniel
    Feb 9 '17 at 0:00











  • @DepressedDaniel not sure what you mean. I just used iotop -oP

    – Sparkler
    Feb 9 '17 at 0:01













14












14








14








When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why?



Here's iotop's example output (other processes with IO<1% omitted):



enter image description here










share|improve this question
















When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why?



Here's iotop's example output (other processes with IO<1% omitted):



enter image description here







process io disk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 4 at 2:37









Boann

1677




1677










asked Feb 8 '17 at 23:24









SparklerSparkler

3291313




3291313












  • Is this with data=journal?

    – DepressedDaniel
    Feb 9 '17 at 0:00











  • @DepressedDaniel not sure what you mean. I just used iotop -oP

    – Sparkler
    Feb 9 '17 at 0:01

















  • Is this with data=journal?

    – DepressedDaniel
    Feb 9 '17 at 0:00











  • @DepressedDaniel not sure what you mean. I just used iotop -oP

    – Sparkler
    Feb 9 '17 at 0:01
















Is this with data=journal?

– DepressedDaniel
Feb 9 '17 at 0:00





Is this with data=journal?

– DepressedDaniel
Feb 9 '17 at 0:00













@DepressedDaniel not sure what you mean. I just used iotop -oP

– Sparkler
Feb 9 '17 at 0:01





@DepressedDaniel not sure what you mean. I just used iotop -oP

– Sparkler
Feb 9 '17 at 0:01










1 Answer
1






active

oldest

votes


















11














jbd2 is a kernel thread that updates the filesystem journal.



Tracing filesystem or disk activity with the process that caused it is difficult because the activities of many processes are combined together. For example, if two processes are reading from the same file at the same time, which process would the read be accounted against? If two processes write to the same directory and the directory is updated on disk only once (combining the two operations), which process would the write be accounted against?



In your case, it appears that most of the traffic consists of updates to the journal. This is traced to the journal updater, but there's no tracing between journal updates and the process(es) that caused the write operation(s) that required this journal update.






share|improve this answer


















  • 1





    Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

    – Sparkler
    Feb 9 '17 at 1:33











  • @Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

    – Gilles
    Feb 9 '17 at 10:25











  • That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

    – jlh
    Dec 31 '18 at 17:37










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f343591%2fwhy-is-most-the-of-disk-io-attributed-to-jbd2-and-not-to-the-process-that-is-act%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









11














jbd2 is a kernel thread that updates the filesystem journal.



Tracing filesystem or disk activity with the process that caused it is difficult because the activities of many processes are combined together. For example, if two processes are reading from the same file at the same time, which process would the read be accounted against? If two processes write to the same directory and the directory is updated on disk only once (combining the two operations), which process would the write be accounted against?



In your case, it appears that most of the traffic consists of updates to the journal. This is traced to the journal updater, but there's no tracing between journal updates and the process(es) that caused the write operation(s) that required this journal update.






share|improve this answer


















  • 1





    Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

    – Sparkler
    Feb 9 '17 at 1:33











  • @Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

    – Gilles
    Feb 9 '17 at 10:25











  • That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

    – jlh
    Dec 31 '18 at 17:37















11














jbd2 is a kernel thread that updates the filesystem journal.



Tracing filesystem or disk activity with the process that caused it is difficult because the activities of many processes are combined together. For example, if two processes are reading from the same file at the same time, which process would the read be accounted against? If two processes write to the same directory and the directory is updated on disk only once (combining the two operations), which process would the write be accounted against?



In your case, it appears that most of the traffic consists of updates to the journal. This is traced to the journal updater, but there's no tracing between journal updates and the process(es) that caused the write operation(s) that required this journal update.






share|improve this answer


















  • 1





    Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

    – Sparkler
    Feb 9 '17 at 1:33











  • @Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

    – Gilles
    Feb 9 '17 at 10:25











  • That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

    – jlh
    Dec 31 '18 at 17:37













11












11








11







jbd2 is a kernel thread that updates the filesystem journal.



Tracing filesystem or disk activity with the process that caused it is difficult because the activities of many processes are combined together. For example, if two processes are reading from the same file at the same time, which process would the read be accounted against? If two processes write to the same directory and the directory is updated on disk only once (combining the two operations), which process would the write be accounted against?



In your case, it appears that most of the traffic consists of updates to the journal. This is traced to the journal updater, but there's no tracing between journal updates and the process(es) that caused the write operation(s) that required this journal update.






share|improve this answer













jbd2 is a kernel thread that updates the filesystem journal.



Tracing filesystem or disk activity with the process that caused it is difficult because the activities of many processes are combined together. For example, if two processes are reading from the same file at the same time, which process would the read be accounted against? If two processes write to the same directory and the directory is updated on disk only once (combining the two operations), which process would the write be accounted against?



In your case, it appears that most of the traffic consists of updates to the journal. This is traced to the journal updater, but there's no tracing between journal updates and the process(es) that caused the write operation(s) that required this journal update.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 9 '17 at 0:39









GillesGilles

539k12810891606




539k12810891606







  • 1





    Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

    – Sparkler
    Feb 9 '17 at 1:33











  • @Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

    – Gilles
    Feb 9 '17 at 10:25











  • That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

    – jlh
    Dec 31 '18 at 17:37












  • 1





    Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

    – Sparkler
    Feb 9 '17 at 1:33











  • @Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

    – Gilles
    Feb 9 '17 at 10:25











  • That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

    – jlh
    Dec 31 '18 at 17:37







1




1





Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

– Sparkler
Feb 9 '17 at 1:33





Which other disk io categories are there besides journal updates? (i.e. why jdb2 is not the only entry in iotop's output?)

– Sparkler
Feb 9 '17 at 1:33













@Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

– Gilles
Feb 9 '17 at 10:25





@Sparkler There's writing the actual data, as well. (Unless you're using a log-structured filesystem, but most aren't.)

– Gilles
Feb 9 '17 at 10:25













That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

– jlh
Dec 31 '18 at 17:37





That explains what happens. But it sucks big time when the original process' I/O priority has been set to 'idle' and jbd2 just continues doing lots of I/O at its own I/O priority.

– jlh
Dec 31 '18 at 17:37

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f343591%2fwhy-is-most-the-of-disk-io-attributed-to-jbd2-and-not-to-the-process-that-is-act%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay