Java Performance: Huge Pages Investigated

Since experience tells us that it is quite rare for one CPU to beat another in a benchmark by a factor 3, we investigated the matter further. The most obvious candidate was Huge Pages, or as everybody besides the Linux community calls it: "Large Pages".

Every modern CPU caches the virtual-to-physical memory mappings in their TLBs. The "normal" size of a page is 4 KB, so with 1536 entries, the Skylake core can only cache about 6 MB per core. Consequently, as DRAM capacity has grown the past 15 years from a few GB to hundreds of GBs, TLB misses have become more and more of a concern. A TLB miss is quite expensive – costing several memory accesses in total – as you need to read out several tables to finally find the physical address.

All modern CPU support larger pages. In the x86-64 (Intel & AMD) a 2 MB large page is the most popular option, while a 1 GB page is also available. Meanwhile a large page on the ThunderX2 is no less than 0.5 GB. Using large pages reduces the number of TLB misses (although the number of entries in the TLB is typically much lower for large pages), and also they reduce the number of memory accesses needed if a TLB miss occurs.

However, it took a while before Linux supported this feature in an easy to handle way. Memory fragmentation, conflicting and hard to configure settings, incompatibilities, and especially very confusing names caused a lot of trouble. In fact, many software vendors still advise server admins to disable large pages. So while it was quickly embraced for benchmarks, the software community as a whole is still hesitant.

To that end, let's see what happens if we enable Transparent Huge Pages and keep the best settings we discussed on the previous page.

SPECJBB 2015-Multi Max-jOPS Huge pages impact

Overall, for Max-jOPs the performance impact is nothing spectaculair; in fact it's a slight regression. The Xeon loses about 1% of its throughput, the ThunderX2 about 5%.

Moving on, let's check out the Critical-jOPS metric, where throughput is measured with a 99 percentile response time constraint.

SPECJBB 2015-Multi Critical-jOPS  Huge pages impact

A massive difference! Instead of taking a massive beating, the Intel setup edges out the ThunderX2. Still, it must be said that performance with 4 KB pages seems to be a major weakness with Intel's architecture.

Java Performance Big Data Benchmarking: Apache Spark
Comments Locked

97 Comments

View All Comments

  • imaheadcase - Wednesday, May 23, 2018 - link

    I really think Anandtech needs to branch into different websites. Its very strange and unappealing to certain users to have business/consumer/random reviews/phone info all bunched together.

    Ever since anand actually left it really did venture into more a business/insider based website with random stuff thrown in. It is in no way a bad thing, its just like this review for instance would not appeal to %95 of readers normally. Everyone likes technology naturally that comes to this website, but its a fine line between talking about high end server components that are out of reach to people who just read the article on the mini-itx gaming motherboard. lol
  • Andrei Frumusanu - Wednesday, May 23, 2018 - link

    You're always free to skip articles, nobody's forcing you to read it.
  • boeush - Wednesday, May 23, 2018 - link

    I guess he'd prefer the site content to be grouped in some manner roughly mirroring market segmentation. For instance: consumer, professional, enterprise, exotic/HPC. As opposed to jumbling everything together. Personally, I don't mind - but then, I'm not known for obsessive-compulsive organizing, either :)
  • BurntMyBacon - Thursday, May 24, 2018 - link

    Given the large differences in tech, focus, needs, and trends, I wouldn't mind breaking out Phones and perhaps servers into their own sections. I think there is more than enough overlap to keep consumer and professional desktop/laptop/workstation together, but that is entirely up to how deeply you want to divide things up. On the other hand, you'll want all of it to show up on the front page in some form, or it'll look like the site doesn't have much activity. Perhaps separate pipelines for each category could work. That all said, I don't really mind just skipping over articles that don't interest me. :)
  • imaheadcase - Thursday, May 24, 2018 - link

    Please, that is just lazy excuse. Even news websites have catagory based on the news you interested in. Anandtech literally had a review of a gaming motherboard then a high end server thing, and newz feed gets filled with phone and other news.
  • name99 - Thursday, May 24, 2018 - link

    God, you must REALLY hate Twitter then...

    I argue with Andrei a lot, but every so often he writes a sentence like "You're always free to skip articles, nobody's forcing you to read it" that makes me want to clap him on the back and say "yes, YOU get it" :-)
  • Threska - Sunday, May 27, 2018 - link

    Taken to it's logical extreme the front page could be a dumping ground cesspool and the retort would be "you don't have to wade through any of it" which sounds witty but doesn't solve anything, but over time would lead to the predictable outcome of people leaving.
  • imaheadcase - Sunday, May 27, 2018 - link

    I do hate twitter, but because it has no valid purpose other than to get customer service done faster with companies because it reflects more on them because public venue. Its mostly just a rant inducing place, or a place that is basically just texting anyways since everyone just wants you to send a DM.

    The whole idea of saying "you are free to skip it" is kinda silly thing to say on the internet now. Especially since more and more you can filter things according to what you want. Not only that, but with the tight competition with views from tech websites its in best interest to have more options.

    Even the layout of website never changed. I mean have you ever been to website without a adblocker on? They don't even advertise tech related stuff on it. Its just stupid clickbait stuff.

    Keep in mind, this is not a complaint about articles itself, its just how they are posted. I love this site, been coming to it ever since i built first pc when i was a kid. But its focus is all over the place now vs years ago out what its posting. I'm half thinking one day i will see a review of electronic toothbrush then next day new CPU.
  • GreenReaper - Monday, June 4, 2018 - link

    I'd be fine with that, as long as it was the best darn toothbrush in town!
  • Threska - Sunday, May 27, 2018 - link

    Accessing through RSS might be a better solution especially with a good reader. Just needs accurate tags to match.

Log in

Don't have an account? Sign up now