[tahoe-lafs-trac-stream] [tahoe-lafs] #20: unit tests take too long

tahoe-lafs trac at tahoe-lafs.org
Tue Apr 24 02:04:39 UTC 2012


#20: unit tests take too long
------------------------+------------------------------
     Reporter:  zooko   |      Owner:  somebody
         Type:  defect  |     Status:  reopened
     Priority:  major   |  Milestone:  eventually
    Component:  code    |    Version:
   Resolution:          |   Keywords:  test performance
Launchpad Bug:          |
------------------------+------------------------------

Comment (by davidsarah):

 I won't have time to work on this ticket, but here are some ideas:
  * create {{{_trial_temp}}} in a tmpfs.
  * run the tests in parallel (obviously this will only help on multicore
 machines).

 To test the first of these, I created a tmpfs using {{{sudo mount -t tmpfs
 -o size=330m tmpfs _trial_temp}}}, and hacked Twisted Trial so that it
 would just use this existing directory rather than trying to delete and
 recreate it.

 Timings for {{{time bin/tahoe debug trial}}} on my machine with
 {{{_trial_temp}}} on disk:
 {{{
 real    14m40.738s
 user    7m34.270s
 sys     0m30.600s
 }}}
 Corresponding timings with {{{_trial_temp}}} on a tmpfs:
 {{{
 real    9m21.444s
 user    7m16.930s
 sys     0m26.130s
 }}}

 Notice that the user CPU time is only slightly reduced, but the real time
 is reduced by ~36%, consistent with a significant improvement in I/O wait
 time. The machine was under memory pressure and I would expect the results
 to be even better if it hadn't been.

 The 330 MiB tmpfs could be smaller if the test suite was optimized to not
 write as much (or to delete files created for tests that pass).

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/20#comment:16>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list