← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/reduce-tftp-logging into lp:maas

 

The proposal to merge lp:~jtv/maas/reduce-tftp-logging into lp:maas has been updated.

Description changed to:

In the twisted-based TFTP server, the file bootstrap.py logs a message for every datagram (yes, including ack) that is received for a session.  This was bogging down our TFTP downloads.

I discussed with Gavin, and I played with using the python logging framework underneath the twisted logging framework, so that log levels would be respected (twisted's logging framework supports log levels but does not honour them).  But that filters out the debug crud pretty much all the way at the back of a long, long chain of logging-related functions.  There's no guarantee that it'd help performance at all — Robie notes that python's logging framework can be painfully slow.

We also considered having some kind of debug flag for the tftpd logging code, but that's adding new infrastructure in somebody else's code.  Upstream would have every right to dislike whatever way we did it, and come up with a better way that would cause conflicts with our patches.

And so in the end, all there is is this silly little change.  I filed it as an upstream “issue” (github's weasel-worded euphemism for bug) to bring it to the author's attention: https://github.com/shylent/python-tx-tftp/issues/7

(You may notice that there's an identical log message elsewhere in the code, which I originally thought was producing the excess.  But a test with a large file showed the one in bootstrap.py to be the culprit.)


Jeroen

For more details, see:
https://code.launchpad.net/~jtv/maas/reduce-tftp-logging/+merge/120758
-- 
https://code.launchpad.net/~jtv/maas/reduce-tftp-logging/+merge/120758
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/reduce-tftp-logging into lp:maas.


References