You are not logged in.

#1 2007-05-26 02:01:45

judfilm
Member
Registered: 2004-02-12
Posts: 229

[AUR] - Hoard Scalable Memory Allocator

Hi, This is more of a developer thing but thought it would be useful to have within Arch since everything is now multicore.

Hoard is a scalable memory allocator (malloc replacement) for multithreaded applications. Hoard can dramatically improve your application's performance on multiprocessor machines. No changes to your source are necessary; just link it in. Hoard scales linearly up to at least 14 processors. The supported platforms include Linux, Solaris, and Windows NT/2000/XP.

plot-threadtest-speedup.gif

plot-larson-speedup.gif

plot-cache-scratch-speedup.gif

Last edited by judfilm (2007-05-27 08:05:00)

Offline

#2 2007-05-26 16:23:45

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

Hi judfilm.

Just uploaded the PKGBUILD to AUR, get it here http://aur.archlinux.org/packages.php?d … 1&ID=11199 and please let me know of any issues or further requests about hoard.

Last edited by anakin (2007-05-26 16:25:48)


www.geekslot.com - a place where peculiar people fit

Offline

#3 2007-05-26 16:29:09

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

It currently builds only the x86 version though I'll change it to support x86_64 soon.


www.geekslot.com - a place where peculiar people fit

Offline

#4 2007-05-26 22:52:40

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

It now detects whether it's an i686 or x86_64 machine and calls make with the appropriate target. Though it should be seamless with autoconf the author of hoard doesn't use it.


www.geekslot.com - a place where peculiar people fit

Offline

#5 2007-05-27 08:04:36

judfilm
Member
Registered: 2004-02-12
Posts: 229

Re: [AUR] - Hoard Scalable Memory Allocator

Wow! Thanks for the PKGBUILD!

Offline

#6 2007-05-27 14:54:47

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

It's an interesting piece of software indeed, hopefully I'll be going multicore soon and I'll certainly use it myself. Meanwhile do you know of any alternative memory allocator which is particularly suited for single cpu/core yielding faster results than the default one?


www.geekslot.com - a place where peculiar people fit

Offline

#7 2007-05-28 10:26:05

Martyr
Member
From: Out there
Registered: 2006-10-04
Posts: 103
Website

Re: [AUR] - Hoard Scalable Memory Allocator

Good stuff.

How may one check if the allocator is actually used? # env shows LD_PRELOAD set up, but pmap <pid> does not show the lib used.

Suggestions?

Offline

#8 2007-05-28 12:38:12

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

Martyr wrote:

Good stuff.

How may one check if the allocator is actually used? # env shows LD_PRELOAD set up, but pmap <pid> does not show the lib used.

Suggestions?

Well I've managed to check wheather hoard was actually being used indirectly by comparing running times before and after setting LD_PRELOAD.


www.geekslot.com - a place where peculiar people fit

Offline

#9 2007-05-31 08:20:21

lynxfox
Member
Registered: 2007-05-31
Posts: 4

Re: [AUR] - Hoard Scalable Memory Allocator

LD_PRELOAD="/path/libhoard.so:/usr/lib/libdl.so"
what does it mean and how I make it work?

Offline

#10 2007-05-31 09:16:34

mitsoko
Banned
From: In the Coal Chamber
Registered: 2007-05-08
Posts: 143

Re: [AUR] - Hoard Scalable Memory Allocator

add

export LD_PRELOAD="/usr/lib/libhoard.so"

to /etc/profile

Offline

#11 2007-05-31 10:59:17

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

lynxfox wrote:

LD_PRELOAD="/path/libhoard.so:/usr/lib/libdl.so"
what does it mean and how I make it work?

It means you must set the LD_PRELOAD environment variable to the path where Hoard is installed, which is /usr/lib/libhoard.so in the PKGBUILD I've submitted. This will override the way the dynamic linker works by default allowing some functions to be replaced by the Hoard's ones (like malloc, the heap memory allocator). There's many ways you can achieve that depending on what distro or shell you're using although raeven suggests quite a standard way which you can follow under Archlinux.


www.geekslot.com - a place where peculiar people fit

Offline

#12 2007-05-31 12:45:13

dongiovanni
Member
From: Germany
Registered: 2006-10-06
Posts: 110

Re: [AUR] - Hoard Scalable Memory Allocator

I put this into /etc/profile, but the variable isn't set. How can i check, if a program is linked against the library?

Offline

#13 2007-05-31 15:15:19

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

dongiovanni wrote:

I put this into /etc/profile, but the variable isn't set. How can i check, if a program is linked against the library?

Did you reload /etc/profile or rebooted after the changes? You can reload it with:

source /etc/profile

www.geekslot.com - a place where peculiar people fit

Offline

#14 2007-06-04 13:59:12

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: [AUR] - Hoard Scalable Memory Allocator

Can I install this for improve my laptop speed?

Offline

#15 2007-06-04 14:59:59

anakin
Member
From: Portugal
Registered: 2006-09-11
Posts: 85
Website

Re: [AUR] - Hoard Scalable Memory Allocator

atlas95 wrote:

Can I install this for improve my laptop speed?

Yes, as long as your laptop has a multi core processor.


www.geekslot.com - a place where peculiar people fit

Offline

#16 2007-06-04 21:55:09

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: [AUR] - Hoard Scalable Memory Allocator

Ok i have install it smile

Offline

#17 2007-06-05 09:42:07

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: [AUR] - Hoard Scalable Memory Allocator

Program which use mono don't work with it, I have error when i launch tomboy and beagle sad

Offline

#18 2007-06-06 06:46:18

mitsoko
Banned
From: In the Coal Chamber
Registered: 2007-05-08
Posts: 143

Re: [AUR] - Hoard Scalable Memory Allocator

create a launch script or edit theirs.. and do something like

#!/bin/sh
LD_PRELOAD="" /usr/bin/app

Offline

#19 2007-06-06 07:48:36

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: [AUR] - Hoard Scalable Memory Allocator

Ok I try thanks wink

edit: this is working, i have edit tomboy and all beagle* files smile

Last edited by atlas95 (2007-06-06 08:29:43)

Offline

#20 2007-06-06 09:51:34

judfilm
Member
Registered: 2004-02-12
Posts: 229

Re: [AUR] - Hoard Scalable Memory Allocator

Fantastic results guys. Thanks to all who have tried this out. Is it possible to combine all the information here and add it to a wiki page?

Offline

#21 2007-06-06 11:02:44

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: [AUR] - Hoard Scalable Memory Allocator

Hmm,

My processor is a intel core 2 duo T5600 is it really usefull for me ? tongue
I'm not sure :s

Offline

Board footer

Powered by FluxBB