enforceRoutes impact on connection speed

Hey!

Wa are developing a VPN app for iOS and whenever we enable enforceRoutes we see 20% to 30% download and upload speed drop. Here are example results from our environment:

                  | Upload | Download |
------------------------------------------
enforceRoutes off | 337.65 |	485.38  |
------------------------------------------
enforceRoutes on  | 236.75 |	357.80  |
------------------------------------------

Is this behavior known and expected? Is there anything we can do to mitigate the effect of enforceRoutes in our application?

Test were performed on iOS 26.2.1.

Answered by DTS Engineer in 876055022
Is this behavior known and expected?

Probably [1]. But it’s useful to have a specific benchmark to highlight this cost. I recommend that you file a bug describing the issue, how you’re testing the performance, and what results you got.

Please post your bug number, just for the record.

Is there anything we can do to mitigate [this] in our application?

Not that I can think of. There isn’t really much wiggle room here. Either the property is on or off and, assuming a specific flows hits your packet tunnel provider in both cases, it sees the same set of packets for that flow.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Historically the networking stack didn’t have fancy features like enforceRoutes, and there’s been decades of optimisation for that simple case.

Is this behavior known and expected?

Probably [1]. But it’s useful to have a specific benchmark to highlight this cost. I recommend that you file a bug describing the issue, how you’re testing the performance, and what results you got.

Please post your bug number, just for the record.

Is there anything we can do to mitigate [this] in our application?

Not that I can think of. There isn’t really much wiggle room here. Either the property is on or off and, assuming a specific flows hits your packet tunnel provider in both cases, it sees the same set of packets for that flow.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Historically the networking stack didn’t have fancy features like enforceRoutes, and there’s been decades of optimisation for that simple case.

enforceRoutes impact on connection speed
 
 
Q