Cole Walker 63fefca36c [PTP] Reduce cpu usage and correct holdover time
Fixes two issues:

1.
The CPU usage consumed by monitoring the kern.log file for changes in
the NIC cgu status was found to be excessive. This change reverts that
implementation and returns to a polling approach similar to what was
already used for monitoring ptp4l and os clock statuses. This has been
observed to bring main process in the notificationservice-base image
down from ~60% CPU to ~8-10% CPU utilization.

In the future, a preferrable implementation would be to work with device
driver owners to provide support for udev events, removing the need to
poll the status of devices.

2.
User supplied holdover times for each service type were not being
applied correctly. Updated daemon.py to set the holdover times in the
service context.

This also includes providing a user configurable "CONTROL_TIMEOUT"
parameter to control the frequency of polling. This is a global value
and affects the polling rate for all services.

Test-plan:
PASS: Build and install ptp-notification app and containers
PASS: Observe reduced CPU usage and confirm that GNSS monitoring still
works
PASS: User supplied holdover times work correctly, along with polling
rate

Story: 2010056
Task: 46512
Task: 46513

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ic0050cc09f5118e7f1c32aa13168084d6456437e
2022-10-06 19:27:04 +00:00

87 lines
1.8 KiB
YAML

#
# Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Default values for notification services.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# global vars for parent and subcharts.
# registration.endpoint.host: registration.{namespace}.svc.{cluster-domain}
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
global:
namespace: notification
registration:
imagePullSecrets: default-registry-key
image:
repository: rabbitmq
tag: 3.8.11-management
pullPolicy: IfNotPresent
endpoint:
host: "registration.notification.svc.cluster.local"
port: 5672
user: admin
pass: admin
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: ptp-registration
operator: In
values:
- "true"
notification:
image:
repository: rabbitmq
tag: 3.8.11-management
endpoint:
port: 5672
user: admin
pass: admin
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: ptp-notification
operator: In
values:
- "true"
location:
image:
repository: starlingx/locationservice-base
tag: stx.5.0-v1.0.1
pullPolicy: IfNotPresent
ptptracking:
imagePullSecrets: default-registry-key
ptp4lSocket: /var/run/ptp4l-ptp4l-legacy
ptp4lServiceName: True
phc2sysServiceName: True
ts2phcServiceName: True
log_level: INFO
image:
repository: starlingx/notificationservice-base
tag: stx.7.0-v1.0.5
pullPolicy: IfNotPresent
control_timeout: 2
device:
simulated: false
holdover_seconds: 15
osclock:
holdover_seconds: 15
overall:
holdover_seconds: 15