Re: changing MAXDSIZ/using more physical memory?

From: Chris Kantarjiev (cak+news_at_dimebank.com)
Date: 06/21/05


Date: Mon, 20 Jun 2005 17:56:04 -0700

tedu wrote:
>
> Chris Kantarjiev wrote:
>
>
>>I am investigating using an mmap'd file for the buffer, but would also like to
>>understand if I can increase the hard limit of RLIMIT_DATA. Is this being set by
>>the MAXDSIZ kernel parameter? Can I "just" raise that number in vmparam.h and
>>recompile, or are there some fundamental limits based on structure sizes?
>
>
> For all released versions, you can use mmap (with MAP_ANON, so you
> don't need a file either) to get around the limit. You won't be able
> to allocate it all at once, but with 2 or 3 calls you can come close.
> Changing anything in vmparam.h is a very bad idea.
>

Using mmap() would be a great idea if I was working in C. I'm not; I'm working
in python, so the code that allocates the arena is several layers down. Changing
it to use mmap() is not something I'm going to do in my spare time over the next
week.

So. Care to expound on *why* changing MAXDSIZ is a 'very bad idea'? I'd be happy
just to double it (to 2GB) which would still make certain that the kernel has
all the room it can want.



Relevant Pages

  • Re: read vs. mmap (or io vs. page faults)
    ... I think you forgot my earlier explanation regarding buffer ... This could explain, why using mmap is not faster than read, but it does ... your vast knowledge of the internals of the kernel workings ... But because the CPU is underutilized, ...
    (freebsd-current)
  • Re: read vs. mmap (or io vs. page faults)
    ... I think you forgot my earlier explanation regarding buffer ... This could explain, why using mmap is not faster than read, but it does ... your vast knowledge of the internals of the kernel workings ... But because the CPU is underutilized, ...
    (freebsd-questions)
  • Re: [Alsa-devel] Re: [PATCH 2.6.13.1 1/1] CS5535 AUDIO ALSA driver
    ... I thought of creating an API for coherent SG-buffers, ... The question is whether mmap of non-coherent buffer may ...
    (Linux-Kernel)
  • Re: Making existing process efficient
    ... using mmap() instead, with madviseto tell the virtual ... pipe with the child. ... The child would inherit the buffer from ... input buffer to an output buffer and thence to the kernel, ...
    (comp.unix.programmer)
  • Re: Question about memory mapping mechanism
    ... The thing is that I'd like to prevent kernel to swap these pages out, ... the buffer pages, I should increase the referrence of the pages by calling ... Well it wasn't this code in particular, but another driver I was putting ... use the infiniband approach to mmap() the user-space pages and send them ...
    (Linux-Kernel)