Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic Ops API/GUI configuration of FQ Pacing plugin #1799

Merged
merged 1 commit into from Mar 13, 2018

Conversation

limited
Copy link
Contributor

@limited limited commented Jan 26, 2018

This activates a Traffic Server Pacing Plugin (apache/trafficserver#3049). Pacing shortens queuing delays in the network and can reduce congestive losses.

This is an optional plugin, with a maximum rate per-Deliveryservice.

Also related is #1942

@limited limited added this to the 2.3 milestone Jan 26, 2018
@limited limited added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops Traffic Ops API labels Jan 26, 2018
@limited limited self-assigned this Jan 26, 2018
@asfgit
Copy link
Contributor

asfgit commented Jan 26, 2018

Can one of the admins verify this patch?

@rob05c rob05c added new feature A new feature, capability or behavior and removed new feature A new feature, capability or behavior new feature labels Jan 26, 2018
@@ -138,7 +138,7 @@ __PACKAGE__->table("deliveryservice");
=head2 max_dns_answers

data_type: 'bigint'
default_value: 0
default_value: 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to be changing the max dns answers here and below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not intentionally changing it as part of this PR, but the generated schema files currently seem to be out of date for this field. After generating the new schema result, I didn't go through and clean up any of the other changes it made to this file.

Do you think this change is incorrect?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily incorrect, but didn't seem to be correct for this particular PR.

<% unless (field('ds.fq_pacing_rate')->valid) { %>
<span class="field-with-error"><%= field('ds.fq_pacing_rate')->error %></span>
<% } %>
%= label_for 'fq_pacing_rate' => 'Max Bytes per Second allowed per session (3000k or 5M are valid entries)', class => 'label'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if someone writes 3T, it stores 3000000000 in the DB. And then when someone goes to edit the field a second time, it will just appear as 3000000000, instead of being displayed as 3T? That seems odd, but might be consistent with our other behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I noticed that in my testing. it is a little weird but didnt seem overly burdensome on an operator.

@asfgit
Copy link
Contributor

asfgit commented Feb 26, 2018

Can one of the admins verify this patch?

@limited
Copy link
Contributor Author

limited commented Feb 27, 2018

ok to test

@asfgit
Copy link
Contributor

asfgit commented Feb 27, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1125/
Test PASSed.

@limited
Copy link
Contributor Author

limited commented Feb 27, 2018

@alficles thanks for the review chris. any other changes you'd like to see before this gets merged?

@alficles
Copy link
Contributor

@limited Nope. I had comments above, but if you're happy with it, it should be fine.

@mitchell852
Copy link
Member

mitchell852 commented Feb 28, 2018

@limited - what types of delivery services does this relate to? You should update the Traffic Portal as well.

There are 4 html forms in TP for a delivery service. One for any_map, dns*, http* and steering*. You should add this field to each form where it applies

https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_portal/app/src/common/modules/form/deliveryService

also, you'll need to add an entry for fqpacing to:

https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_portal/app/src/traffic_portal_properties.json#L124

@asfgit
Copy link
Contributor

asfgit commented Mar 1, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1148/
Test PASSed.

Copy link
Member

@mitchell852 mitchell852 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few suggestions regarding TP changes

@@ -471,6 +471,18 @@
</div>
</div>

<div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.fqPacingRate), 'has-feedback': hasError(deliveryServiceForm.fqPacingRate)}">
<label class="control-label col-md-2 col-sm-2 col-xs-12">
<span uib-popover-html="label('fqPacingRate', 'desc')" popover-trigger="mouseenter" popover-popup-close-delay="2000" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('fqPacingRate', 'title')}}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the

popover-popup-close-delay="2000"

that has been removed from the other form fields

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -468,6 +468,18 @@
</div>
</div>

<div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.fqPacingRate), 'has-feedback': hasError(deliveryServiceForm.fqPacingRate)}">
<label class="control-label col-md-2 col-sm-2 col-xs-12">
<span uib-popover-html="label('fqPacingRate', 'desc')" popover-trigger="mouseenter" popover-popup-close-delay="2000" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('fqPacingRate', 'title')}}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the

popover-popup-close-delay="2000"

that has been removed from the other form fields

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -199,6 +199,10 @@
"title": "Global Max TPS",
"desc": "The maximum transactions this delivery service can serve across all EDGE caches before traffic will be diverted to the bypass destination. For a DNS delivery service, the Bypass Ipv4 or Ipv6 will be used (depending on whether this was a A or AAAA request), and for HTTP delivery services the Bypass FQDN will be used."
},
"fqPacingRate": {
"title": "Fair Queuing Pacing Rate Bps",
"desc": "The maximum bytes per second a cache will delivery on any single TCP connection. This uses the Linux kernel's Fair Queuing setsockopt(SO_MAX_PACING_RATE) to limit the rate of delivery. Traffic exceeding this speed will only be rate-limited and not diverted. This option requires 'net.core.default_qdisc = fq' in /etc/sysctl.conf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to remove the

"This option requires 'net.core.default_qdisc = fq' in /etc/sysctl.conf"

This description is used in a tooltip in TP and the tooltip is intended for users of the system rather than administrators of the system. That comment is a little too technical for users in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed that sentence

@asfgit
Copy link
Contributor

asfgit commented Mar 2, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1157/
Test FAILed.

@limited
Copy link
Contributor Author

limited commented Mar 2, 2018

test this please

@asfgit
Copy link
Contributor

asfgit commented Mar 2, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1158/
Test FAILed.

@mitchell852
Copy link
Member

@limited - looks good to me from a TP perspective

@asfgit
Copy link
Contributor

asfgit commented Mar 7, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1200/
Test PASSed.

@asfgit
Copy link
Contributor

asfgit commented Mar 7, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1201/
Test PASSed.

@dewrich
Copy link
Contributor

dewrich commented Mar 7, 2018

Looks like the test case failed for

Use of uninitialized value in string eq at /Users/dricha209/projects/go/src/github.com/apache/incubator-trafficcontrol/traffic_ops/app/lib/UI/DeliveryService.pm line 208.
t/deliveryservice.t .. 38/?
#   Failed test 'exact match for JSON Pointer "/1/fq_pacing_rate"'
#   at t/deliveryservice.t line 300.
#          got: undef
#     expected: '500000'
# Looks like you failed 1 test of 74.
t/deliveryservice.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/74 subtests

Test Summary Report
-------------------
t/deliveryservice.t (Wstat: 256 Tests: 74 Failed: 1)
  Failed test:  55
  Non-zero exit status: 1
Files=1, Tests=74,  7 wallclock secs ( 0.03 usr  0.01 sys +  3.15 cusr  0.81 csys =  4.00 CPU)
Result: FAIL```

@dewrich
Copy link
Contributor

dewrich commented Mar 13, 2018

Ok, looks good all tests pass

@dewrich dewrich merged commit e85eea8 into apache:master Mar 13, 2018
@limited limited deleted the http_pacing branch September 14, 2018 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants