trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Simplify UDP packet send queue

Open masaori335 opened this issue 8 years ago • 14 comments

When sending UDP packets, the API has an argument to specify when to delivery the packet (delivery_time). And PacketQueue is handling them. But it looks like no one is using this feature now and this is not accessible from TSAPI. So we can remove this feature and make UDP layer more simple.

masaori335 avatar Aug 14 '17 02:08 masaori335

Why do not add TSAPI instead of removing ?

scw00 avatar Aug 15 '17 03:08 scw00

Who need that feature? I'd like remove the overhead and complexity comes from that feature.

masaori335 avatar Aug 15 '17 05:08 masaori335

@maskit I think this feature can do better as we discussed .

I guess schedule_imm in transmit_frame was added for convenience so we don't need to call schedule_imm after calling transmit_frame.

However, scheduling an event on every frame is too expensive, so I think we should add flush(), or bool transmit_now parameter.

scw00 avatar Aug 15 '17 08:08 scw00

@scw00 Hmm, I'm not sure. Maybe not.

A QUIC packet can contain multiple QUIC frames, but a UDP packet always contains only one QUIC packet. So, I think adjusting delivery time of UDP packets wouldn't help that issue (https://github.com/apache/trafficserver/pull/2342#discussion_r133125525).

Am I missing something?

maskit avatar Aug 15 '17 13:08 maskit

No, you are right !

scw00 avatar Aug 15 '17 13:08 scw00

We'll revisit if this is performance issue.

masaori335 avatar Jan 19 '18 05:01 masaori335

#6316

maskit avatar Feb 05 '20 11:02 maskit

Pushed back to TODO since nobody is actively working on it.

maskit avatar Aug 17 '20 05:08 maskit

This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.

github-actions[bot] avatar Feb 03 '22 01:02 github-actions[bot]

Maybe we can use SO_TXTIME instead. See https://docs.rs/quiche/latest/quiche/#pacing.

maskit avatar May 25 '23 23:05 maskit

@brbzull0 You might be interested in this issue since you are working on GRO and sendmsg stuff.

maskit avatar May 25 '23 23:05 maskit

a few months later..... I see this now.. :rofl:

@maskit I can look into this, it seems we can have this option with a config toggle?.

ts:
  quic: << just for quic? or UDP in general.
    pacing: true

brbzull0 avatar Dec 20 '23 11:12 brbzull0

ts.quic.pacing looks reasonable. I can't think of a case that a user want to turn it off, but turning it off could skip unnecessary steps (i.e. setting timing info) on platforms that don't support pacing. I wonder what we can do on FreeBSD.

maskit avatar Dec 20 '23 18:12 maskit

ts.quic.pacing looks reasonable. I can't think of a case that a user want to turn it off, but turning it off could skip unnecessary steps (i.e. setting timing info) on platforms that don't support pacing. I wonder what we can do on FreeBSD.

https://github.com/apache/trafficserver/pull/11330 No coinfig flag though

brbzull0 avatar May 08 '24 09:05 brbzull0

https://github.com/apache/trafficserver/pull/11330 should cover this I guess.

brbzull0 avatar Jul 10 '24 11:07 brbzull0