Opened 8 years ago

Closed 8 years ago

#5291 closed Enhancement (fixed)

"announce and scrape requests have tiny payloads"

Reported by: reardon Owned by: jordan
Priority: Normal Milestone: 2.80
Component: libtransmission Version: 2.76
Severity: Normal Keywords:
Cc:

Description

this comment in web.c seems to have come long before multiscrape. The code there sets up a small buf given that announces and single-scrapes are typically quite small. But multiscrapes can be quite large. So I've been using the following optimization in sockoptfunction()

if (isScrape || isAnnounce)
    {
      const int sndbuf = isScrape ? 4096 : 1024;
      const int rcvbuf = isScrape ? 4096 : 3072;
      setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof (sndbuf));
      setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof (rcvbuf));
    }

This should handle scrapes up to ~60 items.

Change History (2)

comment:1 Changed 8 years ago by jordan

  • Component changed from Transmission to libtransmission
  • Milestone changed from None Set to 2.80
  • Owner set to jordan
  • Status changed from new to assigned

comment:2 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

That's a great point. You're correct, that does predate the multiscrape code.

Patched in r14012.

Note: See TracTickets for help on using tickets.