memcached and streaming

Tomash Brechko tomash.brechko at gmail.com
Mon Feb 4 06:50:20 UTC 2008


On Sun, Feb 03, 2008 at 19:39:59 -0800, dormando wrote:
> > Just a quick note: the code to set/clear TCP_NOPUSH was here before iov
> > work was merged from facebook at r320 (i.e. in 1.1.* branch).

Yep, thanks, I've seen that changeset too.  But I had an impression
that while having TCP_NOPUSH it did something else with it (like
switching to it during a single reply, because then each chunk was
sent separately, there was no iov stuff).


> Yeah; I want to rewrite the way the iov code works... It's not flexible
> enough, relies on mallocing lists _per conn structure_ instead of a
> linked list, and in certain conditions uses too many packets.

Well, you may do that, but this has nothing to do with my proposal.  I
simply suggest to switch between TCP_NODELAY and TCP_CORK/TCP_NOPUSH
depending on the situation.


> Under an mget response the iov stuff works great. Otherwise it's
> probably still fine since most people don't stream changes.

...And binary protocol got rid of mget, because everyone is supposed
to go streaming ;).


It probably would be cleaner to just implement it myself and show the
patch, but I have no time for that right now, only can talk big :).


-- 
   Tomash Brechko


More information about the memcached mailing list