CPU Kernel time VS. User time

1,789 views
Skip to first unread message

Leonid

unread,
May 15, 2012, 10:26:40 AM5/15/12
to mongodb-user
How can I interpret the ratio of the 2 times?
Is true Kernel is I/O spending time?

Kyle Banker

unread,
May 15, 2012, 10:46:59 AM5/15/12
to mongod...@googlegroups.com
Generally speaking, yes. Kernel time is time spent doing system calls, a subset of which are disk and network I/O. Here's a helpful article on the subject:

Leonid

unread,
May 15, 2012, 11:26:12 AM5/15/12
to mongodb-user
Thank You for the quick replying,


Is there any way to estimate more precisely the physical I/O?
I understand MongoDB in general using lazy writes (mmap).
May be because of this fact in windows Task Manager there is no I/O
read/write activity at all for mongod process.?
There is only "I/O Other" that I don't know the meaning?

Is Page Fault is the exactly Number of Page I/O read?

What kind of I/O activity MongoDB doing? - Read: Page Fault, Write:
Background flushing , fsync

I simply misunderstand something: Virtual Memory is mapped to complete
set of Data,Code etc.
Is it means that the data almost completely duplicated on disk or it
is only mapped? I mean the memory usually is much smaller than the
data.

Background flushing syncs the data with physical files. But if data
modified takes more than memory will be run unscheduled Background
flushing?

Sorry for so many questions.

Leonid,.






On May 15, 5:46 pm, Kyle Banker <kyleban...@gmail.com> wrote:
> Generally speaking, yes. Kernel time is time spent doing system calls, a
> subset of which are disk and network I/O. Here's a helpful article on the
> subject:http://www.codinghorror.com/blog/2008/01/understanding-user-and-kerne...

Lars Nilsson

unread,
May 15, 2012, 11:32:12 AM5/15/12
to mongod...@googlegroups.com
On Tue, May 15, 2012 at 11:26 AM, Leonid <lnei...@gmail.com> wrote:
> Is there any way to estimate more precisely the physical I/O?
> I understand MongoDB in general using lazy writes (mmap).
> May be because of this fact in windows Task Manager there is no I/O
> read/write activity at all for mongod process.?
> There is only "I/O Other" that I don't know the meaning?

Try using Performance Monitor on Windows instead of Task Manager.

Windows XP: Control Panel -> Administrative Tools -> Performance
Windows 7: Start Button -> Type "performance" in "Search program and
files" text field and select Performance Monitor

Add counters for the statistics you're interested in.

Hope this helps a bit.

Lars Nilsson

Kyle Banker

unread,
May 15, 2012, 1:00:27 PM5/15/12
to mongod...@googlegroups.com
Page faults don't not correspond to total I/O, since reads from memory won't register as page faults.

Note: on Windows, soft and hard page faults are reported as a single value. In fact, what you should care about is the number of hard page faults.

A page fault could be a read or a write. Background flushing definitely corresponds to writes, which with flushing, we're writing a page (usually 4 KB) at a time.

Leonid

unread,
May 16, 2012, 5:06:18 AM5/16/12
to mongodb-user




> In fact, what you should care about is the number of hard page faults.




1. What kind of faults I see in serverStatus() ?




2. Virtual Memory is mapped to complete set of Data,Code etc.
    Is it means that the data almost completely duplicated on disk or
it
     is only mapped? I mean the memory usually  is much smaller than
the data.





On May 15, 8:00 pm, Kyle Banker <kyleban...@gmail.com> wrote:
> Page faults don't not correspond to total I/O, since reads from memory
> won't register as page faults.
>
> Note: on Windows, soft and hard page faults are reported as a single value.
> In fact, what you should care about is the number of hard page faults.
>
> A page fault could be a read or a write. Background flushing definitely
> corresponds to writes, which with flushing, we're writing a page (usually 4
> KB) at a time.
>
>
>
>
>
>
>
> On Tuesday, May 15, 2012 11:32:12 AM UTC-4, Lars Nilsson wrote:
>

Kyle Banker

unread,
May 16, 2012, 9:18:53 AM5/16/12
to mongod...@googlegroups.com
On Linux, serverStatus() shows hard faults. On Windows, it shows hard and soft faults, but this is being fixed eventually:

It's actually the other way round: all the data on disk is mapped to virtual memory using the mmap() system call (or its Windows equivalent).
Reply all
Reply to author
Forward
0 new messages