In /proc/meminfo, does Dirty include or exclude Writeback?
up vote
0
down vote
favorite
Dirty
%lu - Memory which is waiting to get written back to the disk.
Writeback
%lu - Memory which is actively being written back to the disk.
-- man proc
Does Dirty
include Writeback
? Or is it excluded?
My kernel version is 4.18.16-200.fc28.x86_64.
linux-kernel memory proc cache
add a comment |
up vote
0
down vote
favorite
Dirty
%lu - Memory which is waiting to get written back to the disk.
Writeback
%lu - Memory which is actively being written back to the disk.
-- man proc
Does Dirty
include Writeback
? Or is it excluded?
My kernel version is 4.18.16-200.fc28.x86_64.
linux-kernel memory proc cache
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Dirty
%lu - Memory which is waiting to get written back to the disk.
Writeback
%lu - Memory which is actively being written back to the disk.
-- man proc
Does Dirty
include Writeback
? Or is it excluded?
My kernel version is 4.18.16-200.fc28.x86_64.
linux-kernel memory proc cache
Dirty
%lu - Memory which is waiting to get written back to the disk.
Writeback
%lu - Memory which is actively being written back to the disk.
-- man proc
Does Dirty
include Writeback
? Or is it excluded?
My kernel version is 4.18.16-200.fc28.x86_64.
linux-kernel memory proc cache
linux-kernel memory proc cache
asked Nov 14 at 12:01
sourcejedi
21.8k43396
21.8k43396
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
“Dirty” and “Writeback” are separate stats and page states; for proof of this, see for example node_dirty_ok
:
nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
nr_pages += node_page_state(pgdat, NR_WRITEBACK);
return nr_pages <= limit;
If one included the other, that would be taken into account here.
/proc/meminfo
doesn’t process the corresponding values either:
show_val_kb(m, "Dirty: ",
global_node_page_state(NR_FILE_DIRTY));
show_val_kb(m, "Writeback: ",
global_node_page_state(NR_WRITEBACK));
add a comment |
up vote
0
down vote
I think Dirty
excludes Writeback
.
dd if=/dev/zero of=~/X.img bs=1M count=1 ; sync & for i in 1 2 3; do grep -E '^(Dirty:|Writeback:|MemFree:|Cached:)' /proc/meminfo ; done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00316564 s, 331 MB/s
[1] 13140
MemFree: 1461832 kB
Cached: 1475188 kB
Dirty: 132 kB
Writeback: 1032 kB
...
(Although this is only proof if /proc/meminfo
is guaranteed 100% consistent).
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
“Dirty” and “Writeback” are separate stats and page states; for proof of this, see for example node_dirty_ok
:
nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
nr_pages += node_page_state(pgdat, NR_WRITEBACK);
return nr_pages <= limit;
If one included the other, that would be taken into account here.
/proc/meminfo
doesn’t process the corresponding values either:
show_val_kb(m, "Dirty: ",
global_node_page_state(NR_FILE_DIRTY));
show_val_kb(m, "Writeback: ",
global_node_page_state(NR_WRITEBACK));
add a comment |
up vote
2
down vote
accepted
“Dirty” and “Writeback” are separate stats and page states; for proof of this, see for example node_dirty_ok
:
nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
nr_pages += node_page_state(pgdat, NR_WRITEBACK);
return nr_pages <= limit;
If one included the other, that would be taken into account here.
/proc/meminfo
doesn’t process the corresponding values either:
show_val_kb(m, "Dirty: ",
global_node_page_state(NR_FILE_DIRTY));
show_val_kb(m, "Writeback: ",
global_node_page_state(NR_WRITEBACK));
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
“Dirty” and “Writeback” are separate stats and page states; for proof of this, see for example node_dirty_ok
:
nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
nr_pages += node_page_state(pgdat, NR_WRITEBACK);
return nr_pages <= limit;
If one included the other, that would be taken into account here.
/proc/meminfo
doesn’t process the corresponding values either:
show_val_kb(m, "Dirty: ",
global_node_page_state(NR_FILE_DIRTY));
show_val_kb(m, "Writeback: ",
global_node_page_state(NR_WRITEBACK));
“Dirty” and “Writeback” are separate stats and page states; for proof of this, see for example node_dirty_ok
:
nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
nr_pages += node_page_state(pgdat, NR_WRITEBACK);
return nr_pages <= limit;
If one included the other, that would be taken into account here.
/proc/meminfo
doesn’t process the corresponding values either:
show_val_kb(m, "Dirty: ",
global_node_page_state(NR_FILE_DIRTY));
show_val_kb(m, "Writeback: ",
global_node_page_state(NR_WRITEBACK));
answered Nov 14 at 12:11
Stephen Kitt
157k23343416
157k23343416
add a comment |
add a comment |
up vote
0
down vote
I think Dirty
excludes Writeback
.
dd if=/dev/zero of=~/X.img bs=1M count=1 ; sync & for i in 1 2 3; do grep -E '^(Dirty:|Writeback:|MemFree:|Cached:)' /proc/meminfo ; done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00316564 s, 331 MB/s
[1] 13140
MemFree: 1461832 kB
Cached: 1475188 kB
Dirty: 132 kB
Writeback: 1032 kB
...
(Although this is only proof if /proc/meminfo
is guaranteed 100% consistent).
add a comment |
up vote
0
down vote
I think Dirty
excludes Writeback
.
dd if=/dev/zero of=~/X.img bs=1M count=1 ; sync & for i in 1 2 3; do grep -E '^(Dirty:|Writeback:|MemFree:|Cached:)' /proc/meminfo ; done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00316564 s, 331 MB/s
[1] 13140
MemFree: 1461832 kB
Cached: 1475188 kB
Dirty: 132 kB
Writeback: 1032 kB
...
(Although this is only proof if /proc/meminfo
is guaranteed 100% consistent).
add a comment |
up vote
0
down vote
up vote
0
down vote
I think Dirty
excludes Writeback
.
dd if=/dev/zero of=~/X.img bs=1M count=1 ; sync & for i in 1 2 3; do grep -E '^(Dirty:|Writeback:|MemFree:|Cached:)' /proc/meminfo ; done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00316564 s, 331 MB/s
[1] 13140
MemFree: 1461832 kB
Cached: 1475188 kB
Dirty: 132 kB
Writeback: 1032 kB
...
(Although this is only proof if /proc/meminfo
is guaranteed 100% consistent).
I think Dirty
excludes Writeback
.
dd if=/dev/zero of=~/X.img bs=1M count=1 ; sync & for i in 1 2 3; do grep -E '^(Dirty:|Writeback:|MemFree:|Cached:)' /proc/meminfo ; done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00316564 s, 331 MB/s
[1] 13140
MemFree: 1461832 kB
Cached: 1475188 kB
Dirty: 132 kB
Writeback: 1032 kB
...
(Although this is only proof if /proc/meminfo
is guaranteed 100% consistent).
edited Nov 14 at 12:24
answered Nov 14 at 12:05
sourcejedi
21.8k43396
21.8k43396
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481694%2fin-proc-meminfo-does-dirty-include-or-exclude-writeback%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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