Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

MySQL has large page/hugetlb support for InnoDB. And there's plenty of posts (example) on the topic.

But does anyone have examples of what performance changes they saw ?

I have seen other database systems gain performance from using hugetlb. Eg. a proprietary nosql distributed mmapped key-value store. The store would slow down as the mmapped file grew beyond to .5GB. It didn't degrade particularly more even at after 2 or 3GB.

The observation was along the lines of ; if we stored active user sessions, and at eg. 100 users we had 32MB of data, the read speed would be X records/sec. At 3000 users, we'd be around 1GB, and the read speed degraded to X/2. Read speed covered both hash lookup and copying data. All access was machine local, so it was memory to memory copy.

Now if the users logged out, the store's data file would remain the same, even though the key/val space would shrink back to 32MB, hashtables were rebucketed etc. But the read speed stayed at X/2, and did not climb.

It turned out to be TLB cache misses, and using hugetlb/large pages meant that the speed would stay around X even as users crept towards 10000 and the file grew larger and larger.

That's great and all. And instinct now tells me that MySQL should have the same characteristics and that enabling hugetlb/large pages But without some examples, it's a hard sale to try out.

So, has anyone tried using hugetlb/large pages for performance gain, and what was your experience (good/bad/neutral) ? I'd love to hear both what the DB sizes were and roughly what performance change, if any, you saw.

Numbers welcomed!

share|improve this question
    
Here is me challenging you to run this: cyberciti.biz/tips/linux-hugetlbfs-and-mysql-performance.html on a copy of your production data on a test box and then post your performance results *:) –  polynomial Aug 24 '11 at 6:48

1 Answer 1

Not a MySQL example, but I have seen this exact behavior in Oracle:

http://www.pythian.com/blog/performance-tuning-hugepages-in-linux/

As the post points out, look at /proc/meminfo at the size of PageTables. If you're seeing huge waste of RAM for page tables, you might spend significant CPU time managing them.

MySQL also has some notes on how to implement it and why you would:

http://dev.mysql.com/doc/refman/5.6/en/large-page-support.html

Applications that perform a lot of memory accesses may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses.

share|improve this answer

Your Answer

 
discard

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.