python - Twisted RPC message aggregation -


i'm working python application makes remote procedure calls, using twisted perspective broker's callremote, on tcp connection. system call trace, appears multiple remote procedure calls sender aggregated single sendto() call on socket. same behavior observed receiver's response well. would've thought long socket write-able , if there data send, perspective broker send out on socket. not appear case.

  1. does twisted's perspective broker aggregate multiple rpc messages specific reason, before sent on socket ? in other words, twisted similar nagle's algorithm in tcp ?

  2. if above true, there option turn off behavior ?

twisted performs write buffering in underlying twisted.internet.abstract.filedescriptor object. can try changing twisted.internet.abstract.filedescriptor.send_limit attribute smaller force write socket more frequently.

see twisted bug 4089 discussion send_limit , buffersize attributes.