User: Password:
|
|
Subscribe / Log in / New account

Large pages, large blocks, and large problems

Large pages, large blocks, and large problems

Posted Sep 19, 2007 16:51 UTC (Wed) by avik (guest, #704)
In reply to: Large pages, large blocks, and large problems by james
Parent article: Large pages, large blocks, and large problems

It's an oversimplification. Suppose you have a large memory machine and
you're doing completely random access. With 4KB pages, you'll get a tlb
miss and two cache hits (one for the data and one for the pte). With
large pages, the page tables can be all cached and you only take a tlb
miss and a single cache miss.

So for this contrived workload, you get a ~2X speedup by using large
pages. Obviously real workloads will get less speedup, but it is still
significant.

Another way of stating this is that large pages don't just increase the
coverage of the tlb, they also increase the pagetable coverage of the
data cache, which can be much more significant.


(Log in to post comments)

Large pages, large blocks, and large problems

Posted Sep 20, 2007 0:52 UTC (Thu) by sayler (guest, #3164) [Link]

Yes, *but* you have a commensurate increase in the cost (in silicon area, latency, validation) to support large-page-TLB entries. IIRC (from the above RWT thread) modern Intel processors support only 2 TLB entries for large pages!

In other words, you may lose some performance by going to large pages because of resource constraints.

Large pages, large blocks, and large problems

Posted Sep 20, 2007 5:51 UTC (Thu) by avik (guest, #704) [Link]

I'm talking about current hardware, not proposing changes to hardware.

The workload I described will gain a 2X boost from using large pages
regardless of the tlb's allocation of large and small pages. And while it
is not a real-life workload, others have demonstrated nice performance
improvements with large pages.

Large pages, large blocks, and large problems

Posted Sep 21, 2007 17:17 UTC (Fri) by vonbrand (guest, #4458) [Link]

The cost is the same once the data is in RAM. Loading and storing large pages is costlier. It is not at all that simple.

Large pages, large blocks, and large problems

Posted Sep 21, 2007 19:48 UTC (Fri) by avik (guest, #704) [Link]

My comment (and Linus' remarks) is talking about large pages, not large
blocks. The assumption is that this is a memory workload, not an I/O
workload. There's no disk I/O involved.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds