[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-users
Subject:    Re: [ast-users] Avoid clearing memory from |mmap(MAP_ANON)| ? / was: Re: Severe performance regressi
From:       Glenn Fowler <glenn.s.fowler () gmail ! com>
Date:       2013-12-10 9:40:00
Message-ID: CAK449vAyLMuYnBqqgEBmRCb=xHL_YKBiGyhfuM+gAGCXdHdd_g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I don't know how you are measuring excessive
with the alpha just posted there are no timing or memory diffs on linux for
segsizes 64Ki 4Ki 8Ki 64Mi
add usage to VMALLOC_OPTIONS to get a summary of total region usage in the
last line
all the segsizes show ~250Mi total usage

$ time VMALLOC_OPTIONS=segsize=64Ki $SHELL ./t01

real    0m14.61s
user    0m14.45s
sys     0m0.14s
$ time VMALLOC_OPTIONS=segsize=4Mi $SHELL ./t01

real    0m14.51s
user    0m14.36s
sys     0m0.14s
$ time VMALLOC_OPTIONS=segsize=8Mi $SHELL ./t01

real    0m14.68s
user    0m14.48s
sys     0m0.19s
$ time VMALLOC_OPTIONS=segsize=64Mi $SHELL ./t01

real    0m14.49s
user    0m14.33s
sys     0m0.14s
$ time VMALLOC_OPTIONS=segsize=64Mi,usage $SHELL ./t01
vmalloc: 0x25c2064e6000 67108864 init
vmalloc: 0x25c2064e6000 67108864 init
vmalloc: 0x25c2064e6000 67108864 region 0x007db200 size=268435456 segs=1
packs=1 busy=58% cache=115424/1801

real    0m15.03s
user    0m14.61s
sys     0m0.40s



On Tue, Dec 10, 2013 at 4:16 AM, Lionel Cons <lionelcons1972@gmail.com>wrote:

> On 6 December 2013 16:18, Glenn Fowler <glenn.s.fowler@gmail.com> wrote:
> > On Thu, Dec 5, 2013 at 6:41 PM, Roland Mainz <roland.mainz@nrubsig.org>
> > wrote:
> >> 2. The default block size by the normal |mmap(MAP_ANON)| allocator is
> >> 1MB. This is IMHO far to small because there is IMO not enough space
> >> for the coalescing algorithm to operate and a *lot* of fragmentation
> >> occurs.
> >> IMHO a _minimum_ page size of 4MB should be picked (as a side-effect
> >> the shell would get 4MB or 2MB largepages on platforms like Solaris
> >> automagically).
> >
> >
> > default block size upped to 4Mi and pagesize=<n>[KMGP][i] can ovveride in
> > VMALLOC_OPTIONS for testing
>
> A default block size of 4Mi is not sufficient on linux/x86-64 and
> Solaris/x86-64 to prevent the excessive memory consumption. I've
> played with script to create a graph to see where the excesses stop
> and the turning point is at 8.4Mi.
>
> So, if the default block size is bumped it should be bumped to at least
> 8Mi.
>
> Lionel
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>I don&#39;t know how you are measuring excessive</div><div>with \
the alpha just posted there are no timing or memory diffs on linux for segsizes 64Ki \
4Ki 8Ki 64Mi</div><div>add usage to VMALLOC_OPTIONS to get a summary of total region \
usage in the last line</div> <div>all the segsizes show ~250Mi total \
usage</div><div><br></div><div>$ time VMALLOC_OPTIONS=segsize=64Ki $SHELL ./t01      \
</div><div><br></div><div>real    0m14.61s</div><div>user    0m14.45s</div><div>sys   \
0m0.14s</div> <div>$ time VMALLOC_OPTIONS=segsize=4Mi $SHELL ./t01      \
</div><div><br></div><div>real    0m14.51s</div><div>user    0m14.36s</div><div>sys   \
0m0.14s</div><div>$ time VMALLOC_OPTIONS=segsize=8Mi $SHELL ./t01</div><div> \
<br></div><div>real    0m14.68s</div><div>user    0m14.48s</div><div>sys     \
0m0.19s</div><div>$ time VMALLOC_OPTIONS=segsize=64Mi $SHELL \
./t01</div><div><br></div><div>real    0m14.49s</div><div>user    0m14.33s</div><div> \
sys     0m0.14s</div><div>$ time VMALLOC_OPTIONS=segsize=64Mi,usage $SHELL \
./t01</div><div>vmalloc: 0x25c2064e6000 67108864 init</div><div>vmalloc: \
0x25c2064e6000 67108864 init</div><div>vmalloc: 0x25c2064e6000 67108864 region \
0x007db200 size=268435456 segs=1 packs=1 busy=58% cache=115424/1801</div> \
<div><br></div><div>real    0m15.03s</div><div>user    0m14.61s</div><div>sys     \
0m0.40s</div><div><br></div></div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Tue, Dec 10, 2013 at 4:16 AM, Lionel Cons <span \
dir="ltr">&lt;<a href="mailto:lionelcons1972@gmail.com" \
target="_blank">lionelcons1972@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im">On 6 December 2013 16:18, Glenn Fowler &lt;<a \
href="mailto:glenn.s.fowler@gmail.com">glenn.s.fowler@gmail.com</a>&gt; wrote:<br>

&gt; On Thu, Dec 5, 2013 at 6:41 PM, Roland Mainz &lt;<a \
href="mailto:roland.mainz@nrubsig.org">roland.mainz@nrubsig.org</a>&gt;<br> &gt; \
wrote:<br> </div><div class="im">&gt;&gt; 2. The default block size by the normal \
|mmap(MAP_ANON)| allocator is<br> &gt;&gt; 1MB. This is IMHO far to small because \
there is IMO not enough space<br> &gt;&gt; for the coalescing algorithm to operate \
and a *lot* of fragmentation<br> &gt;&gt; occurs.<br>
&gt;&gt; IMHO a _minimum_ page size of 4MB should be picked (as a side-effect<br>
&gt;&gt; the shell would get 4MB or 2MB largepages on platforms like Solaris<br>
&gt;&gt; automagically).<br>
&gt;<br>
&gt;<br>
&gt; default block size upped to 4Mi and pagesize=&lt;n&gt;[KMGP][i] can ovveride \
in<br> &gt; VMALLOC_OPTIONS for testing<br>
<br>
</div>A default block size of 4Mi is not sufficient on linux/x86-64 and<br>
Solaris/x86-64 to prevent the excessive memory consumption. I&#39;ve<br>
played with script to create a graph to see where the excesses stop<br>
and the turning point is at 8.4Mi.<br>
<br>
So, if the default block size is bumped it should be bumped to at least 8Mi.<br>
<span class="HOEnZb"><font color="#888888"><br>
Lionel<br>
</font></span></blockquote></div><br></div>



_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic