Re: malloc problems with MySQL?



Attila Nagy wrote:
Hello,

I have an SMP i386 machine with 2G RAM on which I would like to test MySQL. The OS is CURRENT as of today.

The problem is that with the exact same configuration as with 6-STABLE, MySQL cannot allocate more than about 400-500MB of memory:

mysqld: (malloc) Error in malloc(838877200): out of memory
mysqld got signal 6;

Limits seems to be OK:
datasize 2097152 kB
I have kern.maxdsiz=2G in loader.conf.

MySQL gets errno 12 (ENOMEM) when trying to allocate that amount of RAM.

What else is needed to make it work with the new malloc implementation? I can malloc the same amount of memory from a one liner program...

Allocations that are larger than the chunk size (2 MB by default) are allocated using mmap(2), rather than sbrk(2). Most likely, your problems will go away if you reduce the heap size, so that mmap has more address space to work with.

Jason
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: malloc problems with MySQL?
    ... MySQL cannot allocate more than about 400-500MB of memory: ... MySQL gets errno 12 when trying to allocate that amount of RAM. ... What else is needed to make it work with the new malloc implementation? ...
    (freebsd-current)
  • Re: memory reported under linux higher that allocated?
    ... I have 4 gig of RAM and when I allocate 3 gig the utilities show that my application is using 87% of the available RAM, so it's a half a gig more, why? ... I count all malloc by incrementing a "m" variable and I decrement the same "m" variable when doing free and at the program exit I display the value of "m" and it is zero. ...
    (Fedora)
  • malloc problems with MySQL?
    ... I have an SMP i386 machine with 2G RAM on which I would like to test MySQL. ... The problem is that with the exact same configuration as with 6-STABLE, MySQL cannot allocate more than about 400-500MB of memory: ... What else is needed to make it work with the new malloc implementation? ...
    (freebsd-current)
  • Re: Multi-dimensional array allocation with single new call
    ... I used to work with C and have a set of libraries which allocate ... multi-dimensional arrayswith single malloc call.Now that I ... Yes, Ram. ... The program below does what you ask in C with malloc(). ...
    (comp.programming)
  • Re: panic: kmem_malloc(16384): kmem_map too small: md-mounted /tmp filled up
    ... But malloc can only allocate from RAM, ... smart enough to substract the sizes of other kernel memory chunks from the ...
    (freebsd-stable)