[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can I compile a hugemem kernel?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/08/07 19:35, Andrew Perrin wrote:
> On Thu, 8 Mar 2007, Ron Johnson wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 03/08/07 15:11, Damien Ferrand wrote:
>>> On 08/03/07 10:28 -0500, Andrew Perrin wrote:
>>>> I seem to have developed a need for a single process (R) to use more
>>>> than
>>>> 3G of RAM. The system has 6G, and is doing virtually nothing else.  Is
>>>> there a way to compile 2.6.18 or higher with the so-called hugemem
>>>> patch
>>>> under debian?
>>> It looks like hugemem is a redhat thing... I don't know if it is
>>> easy/possible to have it under debian. These kernels are generally
>>> heavily
>>> patched.
>>>
>>> But even with this patch, a signle process will be limited to less
>>> than 4G of
>>> memory. As the hugemem kernels have switching overhead check if you
>>> really
>>> can't work in another way.
>>
>> Yes, you really need a 64-bit system for a single process to
>> efficiently use more than 1 (or is it 2?) GB or memory.
>>
> 
> The consensus elsewhere seems to be that it's actually 3G per process,
> but that's still not enough for this application. Oh well....

Every time I've had a process go into a RAM-gobbling death spiral,
it's died at 1 (or 2) GB.  It's been a while since I've seen such a
bug.  But then, I just tried this test program, which successfully
allocated 2.4GB (VIRT 2401m & RES 875m):

$ cat testmem3.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
    unsigned long mb = atoi(argv[1]) * 1024 * 1024;
    char *p = malloc(mb);
    memset(p, 0xDEAD, mb);
    sleep(30);
}
$ gcc -o testmem3 testmem3.c
$ ./testmem3 2400





> 
> ap
> 
> ----------------------------------------------------------------------
> Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
> Assistant Professor of Sociology; Book Review Editor, _Social Forces_
> University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
> New Book: http://www.press.uchicago.edu/cgi-bin/hfs.cgi/00/178592.ctl
> 
> 
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF8NpkS9HxQb37XmcRAlO5AJ9+zylISLDWfwlpAOlL4GaMpqk/hACfbD8d
wVWAg3E+g0GjZVZCP9RlUpM=
=BtWv
-----END PGP SIGNATURE-----



Reply to: