2014년 12월 16일 화요일

Page Fault

I'm having trouble with page fault in mongodb, this server is new and there is little transaction on database but i always have page fault 

insert  query update delete getmore command flushes mapped  vsize    res faults   locked db idx miss %     qr|qw   ar|aw  netIn netOut  conn  set repl       time
     4      8      4     *0      12    22|0       0  44.7g  92.1g  28.4g      0 mailer:0.3%          0       0|0     0|0    42k   193k   237 rep1  PRI   09:17:46
     6      7      4     *0      16    30|0       0  44.7g  92.1g  28.4g      2 mailer:0.4%          0       0|0     0|0    87k   283k   238 rep1  PRI   09:17:47
     5     12      4     *0      14    23|0       0  44.7g  92.1g  28.4g      2 mailer:0.4%          0       0|0     0|0    68k   313k   238 rep1  PRI   09:17:48
     3      9      2     *0       6    13|0       0  44.7g  92.1g  28.4g      1 mailer:0.3%          0       0|0     0|0    37k   208k   238 rep1  PRI   09:17:49
     7     11      4     *0      18    29|0       0  44.7g  92.1g  28.4g      3 mailer:0.5%          0       0|0     0|0   100k   370k   238 rep1  PRI   09:17:50
     6      7      4     *0      16    28|0       0  44.7g  92.1g  28.4g      2 mailer:0.3%          0       0|0     0|0    82k   334k   238 rep1  PRI   09:17:51
     5      7      2     *0      10    17|0       0  44.7g  92.1g  28.4g      0 mailer:0.2%          0       0|0     0|0    68k   240k   238 rep1  PRI   09:17:52
     2      7      4     *0       8    16|0       0  44.7g  92.1g  28.4g      1 mailer:0.3%          0       0|0     0|0    23k   150k   238 rep1  PRI   09:17:53
     3      7      4     *0      10    17|0       0  44.7g  92.1g  28.4g      1 mailer:0.2%          0       0|0     0|0    43k   189k   238 rep1  PRI   09:17:54
     2      8      4     *0       8    16|0       0  44.7g  92.1g  28.4g      0 mailer:0.3%          0       0|0     0|0    29k   199k   238 rep1  PRI   09:17:55

rep1:PRIMARY> db.serverStatus().extra_info
{
        "note" : "fields vary by platform",
        "heap_usage_bytes" : 569423584,
        "page_faults" : 237554
}

 free -m
             total       used       free     shared    buffers     cached
Mem:         32075      31874        201          0        327      29480
-/+ buffers/cache:       2066      30009
Swap:        31999          0      31999


Server have 32 gigabytes of memory and data it's only around 15 gigabytes and there is no other application run on this server except mongodb,
Might somebody can help me to solved this issue,




I'm having trouble with page fault in mongodb, this server is new and there is little transaction on database but i always have page fault 


It is normal to have some page faults when mongod needs to read data that isn't in physical memory yet: http://docs.mongodb.org/manual/administration/monitoring/#administration-monitoring-page-faults.

Your mongostat output has very low page fault activity and the other metrics don't suggest any performance issues. The accumulated page faults are hard to put in context without knowing how long your mongod has been running for .. these could be a very low average over time.

Unless you are noticing any specific performance issues it doesn't seem like there is anything to be concerned about.



Currently mongod service is up for 1068038, here is the detail,

"host" : "tkp85",
        "version" : "2.6.5",
        "process" : "mongod",
        "pid" : NumberLong(22843),
        "uptime" : 1068038,
        "uptimeMillis" : NumberLong(1068038048),
        "uptimeEstimate" : 1061445,
        "localTime" : ISODate("2014-12-17T01:42:45.544Z"),

I know mongodb will experience  page fault when have exhausted memory, i'm just curious because we just start this machine about 2 weeks.



> I know mongodb will experience  page fault when have exhausted memory, i'm
> just curious because we just start this machine about 2 weeks.


As per the docs page I mentioned earlier, the page fault counter in MongoDB is part of normal operation and does not only increase when physical memory is exhausted:

Page faults can occur as MongoDB reads from or writes data to parts of its data files that are not currently located in physical memory. In contrast, operating system page faults happen when physical memory is exhausted and pages of physical memory are swapped to disk.

Unless you see a high (and sustained) number of page faults per second, this is generally not an indicator of a performance problem. For example, if you restart mongod you will see more frequent page faults as newly accessed data is loaded into memory.

Typically page faults (and most monitoring metrics) don't tell a full story in isolation. If you have some monitoring in place you will normally see some correlation with other activity such as op counters (inserts, update, queries, deletes, ..), I/O stats, queues, etc.

If your mongostat output was a representative sample, it doesn't look like you have any performance concern at the moment.



Yeah i think this is not a problem because after I check all goes well in the system.

Thank You for your help Stephen


댓글 없음:

댓글 쓰기