Afficher un message
Vieux 07/03/2006, 20h52   #7
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: For performance, one socket or two with dedicated send/receive?

In article <duitka$30bu$1@calcite.rhyolite.com>,
vjs@calcite.rhyolite.com (Vernon Schryver) wrote:

> In article <barmar-23B8CD.19491306032006@comcast.dca.giganews.com>,
> Barry Margolin <barmar@alum.mit.edu> wrote:
>
> >> Well, the application isn't heavy bidirectional, it will be really
> >> heavy in one direction, and light in the other. I want to guarantee
> >> that the light direction doesn't suffer from any starvation if the
> >> other direction is under heavy load.

> >
> >It shouldn't be a problem. The two directions are effectively
> >independent. Implementations don't usually share any per-connection
> >resources between the two directions, so there's nothing to starve
> >(there may be some system-wide resources that are shared, but then the
> >starvation would affect separate connections just as much as a single
> >connection).

>
> Starvation can happen in the application as well as the operating system
> or network machinery. For example, an application I care about involves
> systems doing what might be described as flooding database changes to
> peers and expecting peers to respond with grouped "commits." Things are
> symmetric. Each system would rather not have incoming commits mixed
> with and so delayed by the far larger database changes in a single TCP
> pipe. The commits from a peer are relatively rare, and far quicker and
> easier to handle that database changes. For various reasons incoming
> commits should have higher priority than incoming database change
> requests. My solution is two TCP connections between each pair of
> peers. Each system handles incoming database changes only after it
> has attended to incoming commits.


This sounds like a very different issue -- you're talking about two
connections for the *same* direction, or for different types of
communication (e.g. FTP's Control and Data connections). The OP was
specifically asking about whether to use separate connections for the
opposite directions.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
 
Page generated in 0,06317 seconds with 9 queries