[Varnish] #575: Python Tools Enhancement
Varnish
varnish-bugs at varnish-cache.org
Mon Oct 11 18:33:18 CEST 2010
#575: Python Tools Enhancement
-------------------------+--------------------------------------------------
Reporter: justquick | Owner: kristian
Type: enhancement | Status: new
Priority: low | Milestone:
Component: varnishadm | Version: trunk
Severity: minor | Keywords: python enhancement
-------------------------+--------------------------------------------------
Comment(by justquick):
I look forward to seeing your changes to python-varnish!
I separated the work among several classes so that the same process can be
run in parallel across multiple varnish instances. The core VarnishHandler
class is the only thing that actually does the work on talking to the
varnish instance and can be instantiated just by itself for single
instance use. The other classes implement run methods which are wrappers
and only useful for multi-instance handling and threading. If you can
think of a better way to organize it, I am open to changing the layout.
threading.Thread has been deprecated (in py2.6) in favor of
multiprocessing.Process because it avoids threads and uses subprocesses to
completely eliminate the use of the GIL. It is very handy for
thread/process intensive applications because GIL switching among threads
can drastically impact performance. Thread performance in this application
is not a concern of mine since there is only one thread per varnish
instance and there shouldnt be a whole lot of switching unless you run a
whole mess of commands at once. Implementing multiprocessing in this
application would introduce the python>=2.6 dependency which i also dont
like.
--
Ticket URL: <http://varnish-cache.org/trac/ticket/575#comment:3>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list