Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Could some one direct me to a command to measure TLB misses on LINUX, please? Is it okay to consider (or approximate) minor page faults as TLB misses?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

You can use perf to access the hardware performance counters:

$ perf stat -e dTLB-load-misses,iTLB-load-misses /path/to/command

e.g. :

$ perf stat -e dTLB-load-misses,iTLB-load-misses /bin/ls > /dev/null

 Performance counter stats for '/bin/ls':

             5,775 dTLB-load-misses                                            
             1,059 iTLB-load-misses                                            

       0.001897682 seconds time elapsed
share|improve this answer

A minor fault and a TLB miss are not good analogues. A minor fault occurs when a requested page is in memory but is not mapped in the current page table. It would certainly be the case that a minor fault will be associated with a TLB miss (as the TLB entries are shortcuts to page table entries) but TLB misses will be caused by many other things eg hard faults, or a transition in a program's locality.

share|improve this answer

Minor page faults occur when the page is already loaded in memory, but the associated page table entry is not yet created. As a side effect, minor page faults always incur TLB misses. On the other hand, a TLB miss occurs when the the translation entry for a page is not residing in the TLB (which is a cache), which may happen when that TLB entry had previously been evicted due to the limited capacity of the TLB.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.