Mon, 18 Jan 2010

nose 0.11

I know nose 0.11 is old news, but I've only recently discovered it's new multiprocess module.

lmacken@tomservo ~/bodhi $ nosetests
................................................................................................
----------------------------------------------------------------------
Ran 96 tests in 725.111s

OK

lmacken@tomservo ~/bodhi $ nosetests --processes=50
................................................................................................
----------------------------------------------------------------------
Ran 96 tests in 10.915s

OK

Nose 0.11 is already in rawhide, and will soon be in updates-testing.

Note to self (and others): Buy the nose developers beer at PyCon next month



posted at: 16:58 | link | Tags: , , , , | 2 comments

Posted by Christopher Perkins at Mon Jan 18 18:13:38 2010

Luke,

keep in mind, you will only get benefits to use as many processes you have cores because of the GIL.  In fact, it's best to limit it to the number of cores so you don't have to worry about GIL contention.

cheers.
-chris

Posted by Jason R. Coombs at Tue Jan 19 07:54:33 2010

Too cool. Thanks for pointing that out!

Chris, if nose is using the multiprocess module, and if I understand correctly, each process is forked into its own Python interpreter, each with its own GIL, and then processes are synchronized with serialized objects. So in that case, GIL contention wouldn't come into the picture.


Name:


E-mail:


URL:


Comment: