public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* java/old_mmap allocation problems...
@ 2001-05-18  6:33 firenza
  2001-05-18 18:39 ` Wayne Whitney
  0 siblings, 1 reply; 3+ messages in thread
From: firenza @ 2001-05-18  6:33 UTC (permalink / raw)
  To: linux-kernel


hi,

i'm having problems to convince java (1.3.1) to allocate more
than 1.9gb of memory on 2.4.2-ac2 (SMP/6gb phys mem) or more
than 1.1gb on 2.2.18 (SMP/2gb phys mem)...

modifing /proc/sys/vm parameters didn't help either... the fact
that i can allocate more memory under 2.4 than under 2.2 lets
me hope that there is some possible kernel/vm tweaking that
would increase those limits...

any pointers would be greatly appreciated!

cheers,
-firenza

PS:

strace snippet of "java -Xmx2g" on the 2.4 system
brk(0x8057000)                          = 0x8057000
old_mmap(NULL, 163840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43691000
old_mmap(NULL, 2181038080, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM 

strace snippet of "java -Xmx1500m" on the 2.2 system
old_mmap(0x2e082000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2e082000
old_mmap(NULL, 163840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2e102000
old_mmap(NULL, 1606418432, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: java/old_mmap allocation problems...
  2001-05-18  6:33 java/old_mmap allocation problems firenza
@ 2001-05-18 18:39 ` Wayne Whitney
  0 siblings, 0 replies; 3+ messages in thread
From: Wayne Whitney @ 2001-05-18 18:39 UTC (permalink / raw)
  To: firenza, linux-kernel

In mailing-lists.linux-kernel, you wrote:

>i'm having problems to convince java (1.3.1) to allocate more
>than 1.9gb of memory on 2.4.2-ac2 (SMP/6gb phys mem) or more
>than 1.1gb on 2.2.18 (SMP/2gb phys mem)...

Take a look at a thread from January starting at this point:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/0101.1/0407.html

Basically the constraint you see is due to how Linux sets up the 4GB
address space on 32-bit i386 hardware.  If you need more than 1.9GB on
2.4.x, it's not too hard to change a couple constants in the kernel to
allow somewhat more.  Feel free to email me for more details if it is
not clear after reading the above thread.

Cheers, Wayne


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: java/old_mmap allocation problems...
       [not found] <linux.kernel.20010518083305.C7657@telecoma.net>
@ 2001-05-18 22:09 ` Aaron Denney
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Denney @ 2001-05-18 22:09 UTC (permalink / raw)
  To: mlist-linux-kernel

On  Fri, 18 May 2001 08:33:05 +0200, firenza@gmx.net <firenza@gmx.net> wrote:
> i'm having problems to convince java (1.3.1) to allocate more
> than 1.9gb of memory on 2.4.2-ac2 (SMP/6gb phys mem) or more
> than 1.1gb on 2.2.18 (SMP/2gb phys mem)...
> 
> modifing /proc/sys/vm parameters didn't help either... the fact
> that i can allocate more memory under 2.4 than under 2.2 lets
> me hope that there is some possible kernel/vm tweaking that
> would increase those limits...

Part of it is the way the kernel set's up the processes VM space.  mmaps
that don't ask for a specific address get mapped starting at 0x40000000,
and the stack bottom is at 0xC0000000 - 1 page, and 0xC0000000-0xFFFFFFFF
is reserved for kernel pointers.  This only leaves 2 GB (- mapped in
shared libraries, - stack space) for your mmapping.  Both lowering the
0x40000000, and raising the 0xC000000 are fairly easy to do though.
(I would suggest 0x1000000, and 0xE0000000.  Note that ELF executables
get mapped in around 0x08000000, and that shrinking the kernel address
space too much will make it unhappy.)

In include/asm-i386/page.h, change __PAGE_OFFSET, which also changes 
PAGE_OFFSET, and TASK_SIZE 
In include/asm-i386/processor.h 
TASK_UNMAPPED_BASE
In arch/i386/vmlinux.lds, the def'n of _start (or . in recent kernels) should
be changed to __PAGE_OFFSET + 0x100000.

Part of it is undoubtedly the Java implementation.  I haven't run across
one that will let me use more than 2 GB, even with the above kernel
tweaks, (or on solaris / UltraSparc).

-- 
Aaron Denney
-><-

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-18 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-18  6:33 java/old_mmap allocation problems firenza
2001-05-18 18:39 ` Wayne Whitney
     [not found] <linux.kernel.20010518083305.C7657@telecoma.net>
2001-05-18 22:09 ` Aaron Denney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox