[Twisted-web] overkill context switches

Andrea Arcangeli andrea at cpushare.com
Tue Sep 27 04:41:00 MDT 2005


On Tue, Sep 27, 2005 at 12:07:02PM +0200, Andrea Arcangeli wrote:
> I'll try to serialize the sql queries, so that no more than one query
> runs at once, and I guess that'll fix it just fine. (working on making
> this change right now)

that fixed it:

 0  0      0  21776 300076 488504    0    0     0     0 1037    53  0  0 100  0
 0  0      0  21776 300076 488504    0    0     0     0 1032    49  0  0 100  0
 1  0      0  21712 300084 488496    0    0     0     4 1040   243 11 26 64  0
 0  0      0  21704 300084 488496    0    0     0     0 1054    81 18 25 58  0
 0  0      0  21704 300084 488496    0    0     0     0 1103    62  1  0 99  0
 0  0      0  21704 300084 488496    0    0     0     0 1088    61  0  0 100  0

it's not scheduling anymore at fast rate. Apparently invoking multiple queries
at the same time to the db through different threads each one returning to a
different deferred, triggers the overscheduling. Perhaps it's not a bug, but it
certainly isn't a feature either ;)



More information about the Twisted-web mailing list