On Wed, Jul 12, 2006 at 12:46:57PM -0500, David Sowder (Zothar) wrote: > Matthew Toseland wrote: > >On Wed, Jul 12, 2006 at 10:39:49AM -0500, David Sowder (Zothar) wrote: > > > >>Matthew Toseland wrote: > >> > >>>On Tue, Jul 11, 2006 at 05:40:22PM -0500, David Sowder (Zothar) wrote: > >>> > >>> > >>>>On my node, which is admittedly not setup to use more than the default > >>>>128 MB of RAM, the MemoryChecker run GC is done roughly every 30 > >>>>seconds and with the timing and before/after compare I've added > >>>>locally, it's taking less than 2 seconds to complete, so this is hardly > >>>>a big performance hit, at least on my machine. > >>>> > >>>>PacketSender perhaps needs to have a minimum sleepTime as well as a > >>>>maximum sleep time? That might be one place to reduce CPU load > >>>>slightly? > >>>> > >>>> > >>>Not a good idea IMHO; if it needs to wake up to send a packet, it needs > >>>to wake up... they don't become urgent immediately... > >>> > >>> > >>We can't delay by up to 25-50 ms? > >> > > > >We already delay. > > > The theory was that the PacketSender thread wouldn't wait 6 ms for the > next scheduled action, but maybe 25 ms to reduce the likelihood that > PacketSender is near 100% runnable CPU-wise. I suppose this behavior > could be fingerprinted though.
We delay and queue stuff anyway. If we send a packet to a peer, we will include any queued messages for that peer; this is packet coalescing. Only after some time (200ms iirc) has passed does a message become urgent, and it will cause a packet send by itself. We do however wake the sender thread up when queueing a packet; maybe we can avoid this. I'll have a look sometime, though I doubt it's a major CPU eater. -- Matthew J Toseland - toad at amphibian.dyndns.org Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20060712/7c372f6f/attachment.pgp>
