Re: Scalability of transient Prevayler
Marcel Oerlemans <[email protected]> Sun, 26 Oct 2014 00:53:41 +0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAKE0622i1ggx9A_DWEt_k_Hs2nyFM2XGUKd_LYPK++HTz_a2iw@mail.gmail.com> |
--===============2351479217447341469== Content-Type: multipart/alternative; boundary=001a11c3d9de46f4250506472b05 --001a11c3d9de46f4250506472b05 Content-Type: text/plain; charset=UTF-8 Hi, Just tested the scalability of the Prevayler transient mode and I got similar results: 1 thread: 22478,04 trans/seconds 2 threads: 2650,94 trans/seconds 3 threads: 235,24 trans/seconds 4 threads: 17,03 trans/seconds These tests were done with a NumberOfObjects of ONE_HUNDRED_THOUSAND, and a duration of 20 seconds per round. The VM was given 1 GB. Tests showed that the cause for low performance was the GC activity, which was around 90% most of the time. So I gave the VM 4GB, which gave these results: 1 thread: 34438,01 trans/seconds 2 threads: 34690,22 trans/seconds 3 threads: 11239,57 trans/seconds 4 threads: 5284,87 trans/seconds The tests again showed the GC as a major reason for the low performance. So I gave the VM 8GB, which yielded these results: 1 thread: 38683,00 trans/seconds 2 threads: 43127,74 trans/seconds 3 threads: 39503,07 trans/seconds 4 threads: 13415,35 trans/seconds And again: GC biggest culprit. Does anybody have an idea? On Sat, Oct 25, 2014 at 9:50 PM, Klaus Wuestefeld <[email protected]> wrote: > Something is weird. ops per second times seconds is way below total ops > for most results. > On Oct 24, 2014 5:55 PM, "Christian Stein" <[email protected]> wrote: > >> Hallo! >> >> What do you expect, when you switch the default Prevayler implementation >> into *transient mode*, skip deep copies (and turn disk sync off, just in >> case)? Here is the snippet from >> PrevaylerTransactionSubject#initializePrevayler() >> >> factory = new PrevaylerFactory<>(); >> factory.configurePrevalentSystem(new TransactionSystem()); >> factory.configurePrevalenceDirectory(_journalDirectory); >> factory.configureJournalSerializer("journal", ...); >> factory.configureTransientMode(true); >> factory.configureTransactionDeepCopy(false); >> factory.configureJournalDiskSync(false); >> prevayler = factory.create(); // No snapshot is generated. >> >> I expected well performing and according to my hardware (4 cores, 8 >> logical processors) scaling numbers. But I got this: >> >> Each round will take approx. 20 seconds to run... >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 20.564 >> Operations total: 912580 >> --------- Round Result: 44377,55 operations/second (1 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 20.376 >> Operations total: 997549 >> --------- Round Result: 4170,05 operations/second (2 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 21.299 >> Operations total: 1009875 >> --------- Round Result: 578,71 operations/second (3 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 23.175 >> Operations total: 1011376 >> --------- Round Result: 64,77 operations/second (4 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 33.357 >> Operations total: 1011385 >> --------- Round Result: 0,27 operations/second (5 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 54.35 >> Operations total: 1011416 >> --------- Round Result: 0,57 operations/second (6 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 52.195 >> Operations total: 1011437 >> --------- Round Result: 0,40 operations/second (7 threads) >> >> Memory used : 1758986240 >> Disk space used : 0 >> Seconds ellapsed: 65.352 >> Operations total: 1011464 >> --------- Round Result: 0,41 operations/second (8 threads) >> >> ----------- BEST ROUND: 44377,55 operations/second (1 threads) >> >> >> ...so, if the persisting task takes virtually no time, the benchmark is >> acting not as I expected. This actually could explain why the P8 test runs >> are producing such low throughput results. >> >> Cheers, >> Christian >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> To unsubscribe go to the end of this page: >> http://lists.sourceforge.net/lists/listinfo/prevayler-discussion >> _______________________________________________ >> "Databases in Memoriam" -- http://www.prevayler.org >> >> > > ------------------------------------------------------------------------------ > > _______________________________________________ > To unsubscribe go to the end of this page: > http://lists.sourceforge.net/lists/listinfo/prevayler-discussion > _______________________________________________ > "Databases in Memoriam" -- http://www.prevayler.org > > --001a11c3d9de46f4250506472b05 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,=C2=A0<div><br></div><div>Just tested the scalability o= f the Prevayler transient mode and I got similar results:</div><div><div>1 = thread: 22478,04 trans/seconds</div><div>2 threads: 2650,94 trans/seconds</= div><div>3 threads: 235,24 trans/seconds</div><div>4 threads: 17,03 trans/s= econds</div></div><div><br></div><div>These tests were done with a=C2=A0Num= berOfObjects of=C2=A0ONE_HUNDRED_THOUSAND, and a duration of 20 seconds per= round.</div><div>The VM was given 1 GB.</div><div>Tests showed that the ca= use for low performance was the GC activity, which was around 90% most of t= he time.</div><div><br></div><div>So I gave the VM 4GB, which gave these re= sults:</div><div><div>1 thread:=C2=A034438,01 trans/seconds</div><div>2 thr= eads:=C2=A034690,22 trans/seconds</div><div>3 threads:=C2=A011239,57 trans/= seconds</div><div>4 threads:=C2=A05284,87 trans/seconds</div></div><div><br= ></div><div>The tests again showed the GC as a major reason for the low per= formance.</div><div><br></div><div><div>So I gave the VM 8GB, which yielded= these results:</div><div></div></div><div><div>1 thread: 38683,00=C2=A0tra= ns/seconds</div><div>2 threads: 43127,74=C2=A0trans/seconds</div><div>3 thr= eads: 39503,07=C2=A0trans/seconds</div><div>4 threads: 13415,35=C2=A0trans/= seconds</div><div><br></div><div>And again: GC biggest culprit.</div><div><= br></div><div><br></div><div>Does anybody have an idea?</div><div><br></div= ><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div= ><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div= ><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br= ></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br= ></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br= ></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br= ></div><div><br></div><div><br></div><div><br></div><div><br></div></div><d= iv class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sat, Oct 25, 201= 4 at 9:50 PM, Klaus Wuestefeld <span dir=3D"ltr"><<a href=3D"mailto:mail= @klaus.pro" target=3D"_blank">[email protected]</a>></span> wrote:<br><bloc= kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc= c solid;padding-left:1ex"><p dir=3D"ltr">Something is weird. ops per second= times seconds is way below total ops for most results.</p> <div class=3D"gmail_quote"><div><div class=3D"h5">On Oct 24, 2014 5:55 PM, = "Christian Stein" <<a href=3D"mailto:[email protected]" targe= t=3D"_blank">[email protected]</a>> wrote:<br type=3D"attribution"></di= v></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border= -left:1px #ccc solid;padding-left:1ex"><div><div class=3D"h5"><div dir=3D"l= tr">Hallo!<div><br></div><div>What do you expect, when you switch the defau= lt Prevayler implementation into <b>transient mode</b>, skip deep copies (a= nd turn disk sync off, just in case)? Here is the snippet from=C2=A0<font f= ace=3D"courier new, monospace">PrevaylerTransactionSubject#initializePrevay= ler()</font></div><div><br></div><div><div><font face=3D"courier new, monos= pace">factory =3D new PrevaylerFactory<>();</font></div><div><font fa= ce=3D"courier new, monospace">factory.configurePrevalentSystem(new Transact= ionSystem());</font></div><div><font face=3D"courier new, monospace">factor= y.configurePrevalenceDirectory(_journalDirectory);</font></div><div><font f= ace=3D"courier new, monospace">factory.configureJournalSerializer("jou= rnal", ...);</font></div><div><font face=3D"courier new, monospace">fa= ctory.configureTransientMode(true);</font></div><div><font face=3D"courier = new, monospace">factory.configureTransactionDeepCopy(false);</font></div><d= iv><font face=3D"courier new, monospace">factory.configureJournalDiskSync(f= alse);</font></div><div><font face=3D"courier new, monospace">prevayler =3D= factory.create(); // No snapshot is generated.</font></div></div><div><br>= </div><div>I expected well performing and according to my hardware (4 cores= , 8 logical processors) scaling numbers. But I got this:</div><div><br></di= v><div><div>Each round will take approx. 20 seconds to run...</div><div><br= ></div><div>Memory used =C2=A0 =C2=A0 : 1758986240</div><div>Disk space use= d : 0</div><div>Seconds ellapsed: 20.564</div><div>Operations total: 912580= </div><div>--------- Round Result: 44377,55 operations/second (1 threads)</= div><div><br></div><div>Memory used =C2=A0 =C2=A0 : 1758986240</div><div>Di= sk space used : 0</div><div>Seconds ellapsed: 20.376</div><div>Operations t= otal: 997549</div><div>--------- Round Result: 4170,05 operations/second (2= threads)</div><div><br></div><div>Memory used =C2=A0 =C2=A0 : 1758986240</= div><div>Disk space used : 0</div><div>Seconds ellapsed: 21.299</div><div>O= perations total: 1009875</div><div>--------- Round Result: 578,71 operation= s/second (3 threads)</div><div><br></div><div>Memory used =C2=A0 =C2=A0 : 1= 758986240</div><div>Disk space used : 0</div><div>Seconds ellapsed: 23.175<= /div><div>Operations total: 1011376</div><div>--------- Round Result: 64,77= operations/second (4 threads)</div><div><br></div><div>Memory used =C2=A0 = =C2=A0 : 1758986240</div><div>Disk space used : 0</div><div>Seconds ellapse= d: 33.357</div><div>Operations total: 1011385</div><div>--------- Round Res= ult: 0,27 operations/second (5 threads)</div><div><br></div><div>Memory use= d =C2=A0 =C2=A0 : 1758986240</div><div>Disk space used : 0</div><div>Second= s ellapsed: 54.35</div><div>Operations total: 1011416</div><div>--------- R= ound Result: 0,57 operations/second (6 threads)</div><div><br></div><div>Me= mory used =C2=A0 =C2=A0 : 1758986240</div><div>Disk space used : 0</div><di= v>Seconds ellapsed: 52.195</div><div>Operations total: 1011437</div><div>--= ------- Round Result: 0,40 operations/second (7 threads)</div><div><br></di= v><div>Memory used =C2=A0 =C2=A0 : 1758986240</div><div>Disk space used : 0= </div><div>Seconds ellapsed: 65.352</div><div>Operations total: 1011464</di= v><div>--------- Round Result: 0,41 operations/second (8 threads)</div><div= ><br></div><div>----------- BEST ROUND: 44377,55 operations/second (1 threa= ds)</div></div><div><br></div><div><br></div><div>...so, if the persisting = task takes virtually no time, the benchmark is acting not as I expected. Th= is actually could explain why the P8 test runs are producing such low throu= ghput results.</div><div><br></div><div>Cheers,</div><div>Christian</div></= div> <br></div></div>-----------------------------------------------------------= -------------------<br> <br>_______________________________________________<br> To unsubscribe go to the end of this page: <a href=3D"http://lists.sourcefo= rge.net/lists/listinfo/prevayler-discussion" target=3D"_blank">http://lists= .sourceforge.net/lists/listinfo/prevayler-discussion</a><br> _______________________________________________<br> "Databases in Memoriam" -- <a href=3D"http://www.prevayler.org" t= arget=3D"_blank">http://www.prevayler.org</a><br> <br></blockquote></div> <br>-----------------------------------------------------------------------= -------<br> <br>_______________________________________________<br> To unsubscribe go to the end of this page: <a href=3D"http://lists.sourcefo= rge.net/lists/listinfo/prevayler-discussion" target=3D"_blank">http://lists= .sourceforge.net/lists/listinfo/prevayler-discussion</a><br> _______________________________________________<br> "Databases in Memoriam" -- <a href=3D"http://www.prevayler.org" t= arget=3D"_blank">http://www.prevayler.org</a><br> <br></blockquote></div><br></div> --001a11c3d9de46f4250506472b05-- --===============2351479217447341469== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ --===============2351479217447341469== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org --===============2351479217447341469==--