1GB process size limit on sparc64

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

1GB process size limit on sparc64

William Schaub
I noticed that you can not have MAXDSIZ > (1*1024*1024*1024) even on a
64 bit platform. The 64bit values are #if 0ed out in vmparam.h IS there
any work being planned to fix this any time soon? Coming from Solaris
this really bugs me.

I may not want every process on the system sucking up 1GB or more but I
sure want to be able to work with more memory in a single process if I
need to. (what if you want to mmap a file larger than 1GB?)

The comment in the 32bit part of the vmparam.h file suggests that going
over those limits causes hangs in the kernel due to integer overflows is
this still the case? how much work would need to be done to get this
working with the sparc64 port?

Reply | Threaded
Open this post in threaded view
|

Re: 1GB process size limit on sparc64

Paul de Weerd
On Thu, Jun 03, 2010 at 10:26:57AM -0400, William Schaub wrote:
| I may not want every process on the system sucking up 1GB or more
| but I sure want to be able to work with more memory in a single
| process if I need to. (what if you want to mmap a file larger than
| 1GB?)

Well .. then you mmap a file larger than 1GB. What of it ? Have you
tried mmap(2)'ing a file larger than 1GB ? I'm guessing you haven't...

For fun (no profit) I just mmap'ed a file that is larger than 8GB on
my amd64 workstation (MAXDSIZ is 8G on amd64, ulimit was the default
for staff, 524288K). I could read each and every byte from this file
(takes ~3.5 minutes and really thrashes my lowly SATA disk).

So, yeah, you can mmap files bigger than MAXDSIZ just fine.

Cheers,

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                http://www.undeadly.org/                 

Reply | Threaded
Open this post in threaded view
|

Re: 1GB process size limit on sparc64

William Schaub
Paul de Weerd wrote:

> On Thu, Jun 03, 2010 at 10:26:57AM -0400, William Schaub wrote:
> | I may not want every process on the system sucking up 1GB or more
> | but I sure want to be able to work with more memory in a single
> | process if I need to. (what if you want to mmap a file larger than
> | 1GB?)
>
> Well .. then you mmap a file larger than 1GB. What of it ? Have you
> tried mmap(2)'ing a file larger than 1GB ? I'm guessing you haven't...
>
> For fun (no profit) I just mmap'ed a file that is larger than 8GB on
> my amd64 workstation (MAXDSIZ is 8G on amd64, ulimit was the default
> for staff, 524288K). I could read each and every byte from this file
> (takes ~3.5 minutes and really thrashes my lowly SATA disk).
>
> So, yeah, you can mmap files bigger than MAXDSIZ just fine.
>
> Cheers,

Ok granted I assumed you couldn't mmap that much only because of the
error I was getting with trying to mount an mfs filesystem based on the
size of one of my swap partitions. which gives back.

mount_mfs: mmap: Cannot allocate memory


Either way I do know 100% for sure that you can never malloc more than
the small amount in MAXDSIZ. and I was just interested in know if there
are any plans to fix that for the sparc64 port. I'm pretty sure on amd64
you the limit is a bit higher. in fact on amd64 the define is:
#define MAXDSIZ         ((paddr_t)8*1024*1024*1024)

I will go ahead and try doing mmap anyway and see what happens.

Reply | Threaded
Open this post in threaded view
|

Re: 1GB process size limit on sparc64

William Schaub
In reply to this post by Paul de Weerd
I just did some testing with mmap(2) and it looks like I can mmap large
files just fine but anonymous mmap does not work past MAXDSIZ.