Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
bedalus
Old
(Last edited by bedalus; 6th June 2012 at 10:18 PM.)
#1  
bedalus's Avatar
Recognized Contributor - OP
Thanks Meter 4942
Posts: 4,727
Join Date: Jun 2011
Default [REF] Memory Allocator Benchmark

This one will be of more interest to kernel developers.

Link to Spreadsheet: Results

RcrdBrt asked me to see which memory allocator performed best, and provided me with four identical kernels except for the allocators being SLQB, SLAB, SLUB, and SLOB.

SLUB turns out to have a slight performance advantage, as RcrdBrt had suspected.

The rank was:
SLUB - 980.56
SLQB - 972.17
SLAB - 967.72
SLOB - 967.72

Not much difference really, but every little helps, as they say at Tesco (Britain's leading super market/Religion).

Thanks to RcrdBrt for trusting me with this nice little study, and to Chainfire for the very useful benchmarking app. (See here)

Methodology

Technical detail (it's not necessary to read this!)

I used CF-Bench to obtain values for:
Native MALLOCS
Native Mem Read
Native Mem Write
Java Mem Read
Java Mem Write

...and used statistical methods to boil 10 passes for each allocator down to one final score: 10 passes is enough to get the mean and median within one percent of each other, i.e. establishes a confidence in the mean, assuming normally distributed data. Three standard deviations are subtracted from the mean, to show the minimum score we'd expect 99.7% of results to be above. This is to penalize variability (high peaks are less significant than a good consistency). The geometric mean is taken of the five end results to provide one final score.
For various benchmarks, see my threads: >here<
The Following 13 Users Say Thank You to bedalus For This Useful Post: [ Click to Expand ]
 
tchaari
Old
#2  
tchaari's Avatar
Senior Member
Thanks Meter 881
Posts: 1,000
Join Date: Dec 2011
Bedalus can't live without benchmarks. Closed UX benchmark yesterday and opened a new one today
One more instructive and helpful benchmark buddy
- Nexus S and Nexus S 4G maintainer in Slim Roms Team
- If you like my work, please hit thanks or donate to our team in order to maintain our servers (we pay for them).
- Thanks to bedalus for his precious benchmarks and his Kernel
- Special thanks for krarvind who created Slim Roms
The Following User Says Thank You to tchaari For This Useful Post: [ Click to Expand ]
 
apatal
Old
#3  
apatal's Avatar
Senior Member
Thanks Meter 1077
Posts: 2,317
Join Date: Feb 2012
Location: Manila
Most kernel developers prefer using SLQB. Any thoughts on why this is the case? Do they have a special reason for that or just a matter of not knowing better? Cheers!
The Following User Says Thank You to apatal For This Useful Post: [ Click to Expand ]
 
bedalus
Old
#4  
bedalus's Avatar
Recognized Contributor - OP
Thanks Meter 4942
Posts: 4,727
Join Date: Jun 2011
RcrdBrt said it was the fashion! Tbh i don't know the differences between them, but some casual googling showed that slub has had success in other Linux arenas
For various benchmarks, see my threads: >here<
 
morfic
Old
#5  
morfic's Avatar
Recognized Developer
Thanks Meter 9046
Posts: 6,105
Join Date: Aug 2008
Location: San Antonio
Quote:
Originally Posted by apatal View Post
Most kernel developers prefer using SLQB. Any thoughts on why this is the case? Do they have a special reason for that or just a matter of not knowing better? Cheers!
Buzzwordism. The other 3 are in kernel.

Sent from my Nexus Prime.
Email me, i suck at replying to PMs.



Direct link to my GIT - http://www.bitbucket.org/morfic/
Direct link to my *old* GIT - http://morfic.euroskank.com/git/

twitter - @morfique
Talk to me on freenode's #trinitykernel
1KBSMtMTDSTr9XU23sYr9wZJBfb2RwpWnf
The Following 2 Users Say Thank You to morfic For This Useful Post: [ Click to Expand ]
 
apatal
Old
#6  
apatal's Avatar
Senior Member
Thanks Meter 1077
Posts: 2,317
Join Date: Feb 2012
Location: Manila
Quote:
Originally Posted by morfic View Post
Buzzwordism. The other 3 are in kernel.
You mean all those allocators are present but they mention only SLQB because it's the trend?

Sent from my Nexus S
 
morfic
Old
#7  
morfic's Avatar
Recognized Developer
Thanks Meter 9046
Posts: 6,105
Join Date: Aug 2008
Location: San Antonio
Quote:
Originally Posted by apatal View Post
You mean all those allocators are present but they mention only SLQB because it's the trend?

Sent from my Nexus S
Correct.

Sent from my Nexus Prime.
Email me, i suck at replying to PMs.



Direct link to my GIT - http://www.bitbucket.org/morfic/
Direct link to my *old* GIT - http://morfic.euroskank.com/git/

twitter - @morfique
Talk to me on freenode's #trinitykernel
1KBSMtMTDSTr9XU23sYr9wZJBfb2RwpWnf
The Following User Says Thank You to morfic For This Useful Post: [ Click to Expand ]
 
glennkaonang
Old
(Last edited by glennkaonang; 7th June 2012 at 05:49 AM.)
#8  
glennkaonang's Avatar
Senior Member
Thanks Meter 194
Posts: 509
Join Date: Feb 2012
Location: Surabaya
Man, bedalus is really fast!

@morfic:
So, in the ICS stock 3.0.8 kernel, how many and which allocators are present?
Am I correct to say that all those four allocators are present, but only one is used?
Sorry for these dumb questions.
 
morfic
Old
#9  
morfic's Avatar
Recognized Developer
Thanks Meter 9046
Posts: 6,105
Join Date: Aug 2008
Location: San Antonio
Quote:
Originally Posted by glennkaonang View Post
Man, bedalus is really fast!

@morfic:
So, in the ICS stock 3.0.8 kernel, how many and which allocators are present?
Am I correct to say that all those four allocators are present, but only one is used?
SLAB, SLUB, SLOB are in most (mainline) Linux Kernel, SLQB is patched in.
Email me, i suck at replying to PMs.



Direct link to my GIT - http://www.bitbucket.org/morfic/
Direct link to my *old* GIT - http://morfic.euroskank.com/git/

twitter - @morfique
Talk to me on freenode's #trinitykernel
1KBSMtMTDSTr9XU23sYr9wZJBfb2RwpWnf
The Following 2 Users Say Thank You to morfic For This Useful Post: [ Click to Expand ]
 
morfic
Old
#10  
morfic's Avatar
Recognized Developer
Thanks Meter 9046
Posts: 6,105
Join Date: Aug 2008
Location: San Antonio
bedalus, did you run this on GB too?
Email me, i suck at replying to PMs.



Direct link to my GIT - http://www.bitbucket.org/morfic/
Direct link to my *old* GIT - http://morfic.euroskank.com/git/

twitter - @morfique
Talk to me on freenode's #trinitykernel
1KBSMtMTDSTr9XU23sYr9wZJBfb2RwpWnf

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...