Subject: Re: sosend_loan tweak
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Jonathan Stone <jonathan@Pescadero.dsg.stanford.edu>
List: tech-net
Date: 10/31/2005 11:13:10
In message <1130589505.385718.11053.nullmailer@yamt.dyndns.org>,
YAMAMOTO Takashi writes:

>> > currently, when doing tcp bulk send and send buffer is filled up,
>> > we ends up with per-ack small copyin()s rather than page loaning.
>> >
>> > the attached patch is to increase chances to use loaning by giving it
>> > some "bonus" buffer space.
>> > in my test environment, it actually yields some noticable  
>> > improvements.
>> 
>> How much improvement have you measured?
>> 
>> It seems reasonable to me, even though it seems we could end up using  
>> more than the sbspace available in the socket buffer, because we  
>> aren't actually allocating new buffers and filling them.
>> 
>> -- thorpej
>
>i haven't committed this change because i found it can beat OOB data.
>it can be worked around by giving more space for OOB data,
>say, 4096 bytes for loaning and 4096+1024 for OOB data.
>but i'm not entirely happy with it.
>does anyone have an idea to solve this more cleanly?

Hi,

Maybe this is just the vicodin talking, but....

Surely this is what the watermark setsockopt()s are for? If one
desires one's application to send `large' chunks, to gain more from
page loanout, then shouldn't one be setting the send-side watermark to
be at least one page?

Or if you don't want to put the setsockopt()s into your application,
how about changing the default watermarks to be more friendly to sosend()?

(and if it *is* vicodin talking, please be gentle when you correct me. :-/)