Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




28.3. Improve performance Using GNU malloc library

If you're suffering from memory limitations on your system, the cache performance of Squid will be affected. To reduce this problem, you can link Squid with an external malloc library such as GNU malloc. To make Squid use GNU malloc as an external library, follows these simple steps:

These are the Package(s) required:

GNU malloc Homepage:
You must be sure to download: malloc.tar.gz

                 [root@deep] /# cp malloc.tar.gz /var/tmp
                 [root@deep] /# cd /var/tmp
                 [root@deep ]/tmp# tar xzpf malloc.tar.gz

  1. Compile and install GNU malloc on your system by executing the following commands:
                       [root@deep ]/tmp# cd malloc
                       [root@deep ]/malloc# export CC=egcs
                       [root@deep ]/malloc# make

  2. Copy the libmalloc.a file to your system library directory and be sure to name it libgnumalloc.a
                       [root@deep ]/malloc# cp libmalloc.a /usr/lib/libgnumalloc.a

  3. Copy the malloc.h file to your system's include directory and be sure to name it gnumalloc.h
                       [root@deep ]/malloc# cp malloc.h /usr/include/gnumalloc.h
    With the files libgnumalloc.a and gnumalloc.h installed on your system, Squid will detect them automatically during its compile time, and will use them to improve its cache performance.

  Published under the terms of the Open Publication License Design by Interspire