Skip to main content
Version: 1.11.0

How to tune system performance

This section provides general guidelines on how to get the best performance from the system.

Scalability​

When the load increases, the following services can be scaled in manual mode to stabilize

operation:

  • image-api-liveness-estimator is the service used to detect a face and determine if the face in the image is real or fake.

  • image-api-age-estimator is the service used to estimate a person’s age from a face image.

  • image-api-gender-estimator is the service used to estimate a person’s gender from a face image.

  • image-api-mask-estimator is the service that detects if a person in the image is wearing a medical mask.

  • image-api-emotion-estimator is the service that estimates a person's emotions from a face image.

  • image-api-face-detector-template-extractor-dep is the service used to build face biometric templates.

  • image-api-face-detector-face-fitter-dep is the service used for face detection and obtaining anthropomorphic face points.

  • decoder-core is the service used for video decoding.

  • video-recorder-video-recorder is the service used for saving recorded videos.

  • lrs-lrs is the service used for calculating liveness from video.

To scale the service, run the command below:

$ kubectl scale deployment <SERVICE_NAME> --replicas <COUNT>

where SERVICE_NAME is a service name (for example, gateway-dep), and COUNT is a number of service instances.

To handle a load of A requests per second on a server with B physical CPU cores, when the input load contains validation with video recording and motion control (both videos having the following characteristics:

  • format: webm
  • codec: vp8
  • resolution: 720p
  • duration: 2.8 seconds
  • frames per second: 13),

you should scale the replicas of the following services based on the formula min(A, B):

  • decoder-core
  • video-recorder-video-recorder
  • lrs-lrs
  • image-api-face-detector-face-fitter-dep

For the image-api-face-detector-face-detector-template-extractor-dep service, use the scaling formula min(A*2, B).

If the server has a GPU installed, where C is the GPU RAM in megabytes and D is calculated as fix(C/1000), the image-api-face-detector-template-extractor-dep service should be scaled by min(A, D).

To save the scaling parameters, open the files ./cfg/platform.values.yaml, ./cfg/image-api.values.yaml, ./cfg/lrs.values.yaml, ./cfg/video-recorder.values.yaml and ./cfg/decoder.values.yaml, find the replicas field in the service block and specify the new replica values.

During next installations services will be automatically scaled to the specified values.