[Twisted-Python] Names DNS Client too chatty

Yaroslav Fedevych jaroslaw.fedewicz at gmail.com
Mon Jan 24 13:25:49 EST 2011


On Jan 24, 2011, at 8:09 PM, exarkun at twistedmatrix.com wrote:

> On 05:24 pm, jasonjwwilliams at gmail.com wrote:
>> If there's no objections the rest of today, I'll make sure the 4021
>> patch still applies and see what could be done as a test.
> 
> I think it would be sad to lose the port starting up log messages. Sure, they're a nuisance if you start and stop 50k ports per second. However, they're just what you want if you have a boring server that starts one or two ports in the entire lifetime of your application.

I think the fail of it all is that all factories, by default, are noisy unless explicitly declared quiet, without an option to be quiet unless explicitly declared noisy.

I've had this problem with t.web. Sure it's good to have every access logged the moment it arrives, especially if it's just your plain old boring webserver, but it stops being fun when the server is tasked to interface with a special client software which is expected to routinely make 1000–2000 requests per second. I've never made it to 1000 per second on decent hardware, and that's sad. Now the project is in Perl, it has some scalability and codebase issues, but at least it copes with event pressure. :-(

It would surely be nice to have a logger which flushes out, say, every 2000 messages or every few seconds, whichever comes first (it would be a lot more filesystem efficient), suitable if you have a freaking lot of events, you need to log them all and you are not stock broker (in which case integrity really prevails over speed) or you have the integrity taken care about elsewhere (say it's in a postgresql database with good settings).

The sad thing is that I haven't figured out how to make my own logger, how to tell everything to use it and how to shut irrelevant server parts up without hacks. Maybe folks refactoring the documentation will come up with something.

-- 
Yaroslav Fedevych
Software Developer and Consultant
jaroslaw.fedewicz at gmail.com
+380685061839, +380969783173




More information about the Twisted-Python mailing list