Take the 2-minute tour ×
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

2 Answers 2

up vote 5 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

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.