Re: Improving ETS performances

Данила Федящин <[email protected]> Fri, 31 Oct 2014 18:29:47 +0300
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <CAAxJiQnZwEhvZk9+UuWwbWWknPVOP8TfHJyMZeWkCjJHRfD08A@mail.gmail.com>
--===============7650185246061248745==
Content-Type: multipart/alternative; boundary=089e01537fc6d4b1e70506b9aab1

--089e01537fc6d4b1e70506b9aab1
Content-Type: text/plain; charset=UTF-8

Hello,

Any news regarding this patch?

2014-06-27 11:42 GMT+03:00 Francesco Lattanzio <[email protected]>:

> Removed dots from commit messages.
> A new pull request has been submitted. Here is the new patch:
>
>   git fetch https://github.com/fltt/otp.git ets_nested_lht_4
>
>   https://github.com/fltt/otp/compare/erlang:maint...ets_nested_lht_4
>
> https://github.com/fltt/otp/compare/erlang:maint...ets_nested_lht_4.patch
>
> --
> Francesco Lattanzio
>
> On Wed, Jun 25, 2014 at 09:38:06PM +0200, Francesco Lattanzio wrote:
> > Hello again Sverker,
> >     I've made some progress with this patch. Briefly:
> >
> > * set tables and bag/duplicate_bag tables are now managed by dedicated
> >   code -- erl_db_hash.[ch] and erl_db_nested_hash.[ch] respectively
> > * reduced memory overhead
> >
> > You can compute the difference (in words) between the new and the old
> > implementations' memory footprints (when nested LHT is not active) of a
> > collection of 'n' objects sharing the same key as:
> >
> >   MemDiff = 4 - n
> >
> > I used this formula to fix the ets suite's memory test case.
> >
> > With regard to the yielding problem, I deciced not to fix it now for the
> > following reasons:
> >
> > 1) it is unrelated to the nested LHT, as the problem manifests itself
> >    even in the current (non-nested LHT) implementation
> > 2) you offered to fix it yourself
> >
> > The patch is available at:
> >
> >   git fetch https://github.com/fltt/otp.git ets_nested_lht_3
> >
> >   https://github.com/fltt/otp/compare/erlang:maint...ets_nested_lht_3
> >
> https://github.com/fltt/otp/compare/erlang:maint...ets_nested_lht_3.patch
> >
> > It is based on the maint branch.
> >
> > I've tested it on Linux x86_64, latest kernel (all the test suites) and
> > FreeBSD/i386 9.2 (only the emulator, kernel and stdlib test suites).
> >
> > Have another nice day.
> _______________________________________________
> erlang-patches mailing list
> [email protected]
> http://erlang.org/mailman/listinfo/erlang-patches
>

--089e01537fc6d4b1e70506b9aab1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>Any news regarding this patch?</=
div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">2014-06=
-27 11:42 GMT+03:00 Francesco Lattanzio <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:[email protected]" target=3D"_blank">[email protected]=
</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">Removed dots from commit=
 messages.<br>
A new pull request has been submitted. Here is the new patch:<br>
<br>
=C2=A0 git fetch <a href=3D"https://github.com/fltt/otp.git" target=3D"_bla=
nk">https://github.com/fltt/otp.git</a> ets_nested_lht_4<br>
<br>
=C2=A0 <a href=3D"https://github.com/fltt/otp/compare/erlang:maint...ets_ne=
sted_lht_4" target=3D"_blank">https://github.com/fltt/otp/compare/erlang:ma=
int...ets_nested_lht_4</a><br>
=C2=A0 <a href=3D"https://github.com/fltt/otp/compare/erlang:maint...ets_ne=
sted_lht_4.patch" target=3D"_blank">https://github.com/fltt/otp/compare/erl=
ang:maint...ets_nested_lht_4.patch</a><br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
Francesco Lattanzio<br>
</font></span><span class=3D"im HOEnZb"><br>
On Wed, Jun 25, 2014 at 09:38:06PM +0200, Francesco Lattanzio wrote:<br>
&gt; Hello again Sverker,<br>
&gt;=C2=A0 =C2=A0 =C2=A0I&#39;ve made some progress with this patch. Briefl=
y:<br>
&gt;<br>
&gt; * set tables and bag/duplicate_bag tables are now managed by dedicated=
<br>
&gt;=C2=A0 =C2=A0code -- erl_db_hash.[ch] and erl_db_nested_hash.[ch] respe=
ctively<br>
&gt; * reduced memory overhead<br>
&gt;<br>
&gt; You can compute the difference (in words) between the new and the old<=
br>
&gt; implementations&#39; memory footprints (when nested LHT is not active)=
 of a<br>
&gt; collection of &#39;n&#39; objects sharing the same key as:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0MemDiff =3D 4 - n<br>
&gt;<br>
&gt; I used this formula to fix the ets suite&#39;s memory test case.<br>
&gt;<br>
&gt; With regard to the yielding problem, I deciced not to fix it now for t=
he<br>
&gt; following reasons:<br>
&gt;<br>
&gt; 1) it is unrelated to the nested LHT, as the problem manifests itself<=
br>
&gt;=C2=A0 =C2=A0 even in the current (non-nested LHT) implementation<br>
&gt; 2) you offered to fix it yourself<br>
&gt;<br>
&gt; The patch is available at:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0git fetch <a href=3D"https://github.com/fltt/otp.git" targ=
et=3D"_blank">https://github.com/fltt/otp.git</a> ets_nested_lht_3<br>
&gt;<br>
&gt;=C2=A0 =C2=A0<a href=3D"https://github.com/fltt/otp/compare/erlang:main=
t...ets_nested_lht_3" target=3D"_blank">https://github.com/fltt/otp/compare=
/erlang:maint...ets_nested_lht_3</a><br>
&gt;=C2=A0 =C2=A0<a href=3D"https://github.com/fltt/otp/compare/erlang:main=
t...ets_nested_lht_3.patch" target=3D"_blank">https://github.com/fltt/otp/c=
ompare/erlang:maint...ets_nested_lht_3.patch</a><br>
&gt;<br>
&gt; It is based on the maint branch.<br>
&gt;<br>
&gt; I&#39;ve tested it on Linux x86_64, latest kernel (all the test suites=
) and<br>
&gt; FreeBSD/i386 9.2 (only the emulator, kernel and stdlib test suites).<b=
r>
&gt;<br>
&gt; Have another nice day.<br>
</span><div class=3D"HOEnZb"><div class=3D"h5">____________________________=
___________________<br>
erlang-patches mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><=
br>
<a href=3D"http://erlang.org/mailman/listinfo/erlang-patches" target=3D"_bl=
ank">http://erlang.org/mailman/listinfo/erlang-patches</a><br>
</div></div></blockquote></div><br></div>

--089e01537fc6d4b1e70506b9aab1--

--===============7650185246061248745==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches

--===============7650185246061248745==--