<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2002-2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> <document> <header> <title>The Hoard Multiprocessor Memory Allocator</title> </header> <!-- <articleinfo> <author> <firstname>Emery</firstname> <surname>Berger</surname> <affiliation>University of Massachusetts Amherst</affiliation> <street>Department of Computer Science</street> <city>Amherst</city> <state>Massachusetts</state> <country>USA</country> <email>emery@cs.umass.edu</email> </author> <pubdate>2004-12-08</pubdate> <copyright> <year>2004</year> <holder role="mailto:emery@cs.umass.edu">Emery Berger</holder> </copyright> <abstract> Documentation for the Hoard scalable memory allocator, including build and usage directions for several platforms. </abstract> </articleinfo> --> <body> <p class="quote"> ...if you'll be running on multiprocessor machines, ... <strong>use <a href="http://www.cs.umass.edu/~emery">Emery Berger</a>'s excellent Hoard multiprocessor memory management code</strong>. It's a drop-in replacement for the C and C++ memory routines and is very fast on multiprocessor machines. <em><a href="http://www.nerdbooks.com/item.php?id=0735615365">Debugging Applications for Microsoft .NET and Microsoft Windows</a>, Microsoft Press, 2003</em> </p> <!-- <p class="quote"> <strong>hoard:</strong> To amass and put away (anything valuable) for preservation, security, or future use; to treasure up: esp. money or wealth. <em>Oxford English Dictionary</em> </p> --> <p> The Hoard memory allocator is a fast, scalable, and memory-efficient memory allocator for shared-memory multiprocessors. It runs on a variety of platforms, including Linux, Solaris, and Windows. Hoard is a drop-in replacement for malloc(), etc. No change to your source is necessary. Just link it in or set just one environment variable (see <a href="using.html">Using Hoard</a> for more information). <strong>Hoard can dramatically improve the performance of multithreaded programs running on multiprocessors.</strong> </p> <section> <title>Why Hoard?</title> <p> There are a number of problems with existing memory allocators that make Hoard a better choice. </p> <section> <title>Contention</title> <p> Multithreaded programs often do not scale because the heap is a bottleneck. When multiple threads simultaneously allocate or deallocate memory from the allocator, the allocator will serialize them. Programs making intensive use of the allocator actually slow down as the number of processors increases. Your program may be allocation-intensive without you realizing it, for instance, if your program makes many calls to the C++ Standard Template Library (STL). </p> </section> <section> <title>False Sharing</title> <p> The allocator can cause other problems for multithreaded code. It can lead to <em>false sharing</em> in your application: threads on different CPUs can end up with memory in the same cache line, or chunk of memory. Accessing these falsely-shared cache lines is hundreds of times slower than accessing unshared cache lines. </p> </section> <section> <title>Blowup</title> <p> Multithreaded programs can also lead the allocator to blowup memory consumption. This effect can multiply the amount of memory needed to run your application by the number of CPUs on your machine: four CPUs could mean that you need four times as much memory. Hoard is a fast allocator that solves all of these problems. </p> </section> </section> <section> <title>Press</title> <p> <a href="http://www.intel.com/cd/ids/developer/asmo-na/eng/dc/xeon/43893.htm?page=4"><strong>Intel</strong> highlights the benefits of using Hoard</a> (a previous, slower version) on a 4-way Xeon system. </p> <p> <a href="http://developers.sun.com/solaris/articles/multiproc/multiproc.html"><strong>Sun</strong> concludes that Hoard is more space-efficient</a> than their own allocators. </p> </section> <!-- <section> <title>How Do I Use Hoard?</title> <p> Hoard is a drop-in replacement for malloc(), etc. No change to your source is necessary. Just link it in or set just one environment variable. See <a href="using.html">Using Hoard</a> for more information. </p> </section> --> <section> <title>Who's Using Hoard?</title> <p> Companies using Hoard in their products and servers include <a href="http://www.aol.com">AOL</a>, <a href="http://www.bt.com">British Telecom</a>, <a href="http://www.businessobjects.com">Business Objects</a> (formerly Crystal Decisions), <a href="http://www.entrust.com">Entrust</a>, <a href="http://www.novell.com">Novell</a>, <a href="http://www.openwave.com">OpenWave Systems</a> (for their Typhoon and Twister servers), and <a href="http://www.reuters.com">Reuters</a>. </p> <p> Open source projects using Hoard include the Bayonne GNU telephony server, the <a href="http://supertech.lcs.mit.edu/cilk/">Cilk</a> parallel programming language, the <a href="http://www.cs.dartmouth.edu/research/DaSSF/index.html">Dartmouth Scalable Simulation Framework</a>, and the <a href="http://www.gnu.org/software/commoncpp/">GNU Common C++</a> system. </p> <p> Hoard is also a part of several major Linux distributions, including Debian and Novell's SuSe. </p> </section> <section> <title>More Information</title> <p> The first place to look for Hoard-related information is at the Hoard web page, <a href="http://www.hoard.org">www.hoard.org</a>. </p> <p> There are two mailing lists you should join if you are a user of Hoard. If you are just interested in being informed of new releases, join the <a href="http://groups.yahoo.com/group/hoard-announce/">Hoard-Announce</a> list. For general Hoard discussion, join the <a href="http://groups.yahoo.com/group/hoard/">Hoard</a> mailing list. You can also search the archives of these lists. </p> </section> <section> <title>Technical Information</title> <p> For technical details of a previous version of Hoard, read <a href="http://www.cs.umass.edu/~emery/hoard/asplos2000.pdf">Hoard: A Scalable Memory Allocator for Multithreaded Applications</a>, by Emery D. Berger, Kathryn S. McKinley, Robert D. Blumofe, and Paul R. Wilson. The Ninth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-IX). Cambridge, MA, November 2000. </p> </section> </body> </document>