Re: org.prevayler.implementation.PersistenceTest#testDiskSyncPerformance
Karl Wettin <[email protected]> Wed, 31 Oct 2012 17:15:04 +0100
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
31 okt 2012 kl. 00:39 skrev Klaus Wuestefeld: >> This test fails now and then. I would very much like to fix it but don't >> understand what it's supposed to do. Can someone please help me out? > > It is supposed to test that forcing sync to disk should be slower than > letting the O.S. buffer things. A few things might make the test stop > failing: > > - Use System.nanotime() instead of currentTimeMillis() in lines 106 > and 112 to get finer granularity. I'm getting diffs at 5-10 milliseconds, so that should not be the problem. > - Call system.gc() before line 103 to avoid one run influencing the other. No change. > Are you sure FD.sync() actually does something on your platform? Is > the HD cache disabled? I have no clue. It's a vanilla installation of OS X Lion, it would surprise me if there was no FS cache at the OS level. Only see it fail on my MacBook Air with an SSD. My guess is that it has something to do with me using an SSD, but that sounds strange in so many ways. I'll ask a few friends of mine to run tests on their machines to see what happens. karl ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org