Starting with snapd 2.59, support for per-service quota groups will be introduced. This means that it will be possible to create sub quota-groups that contain on or multiple services of a snap, as long as that snap is in the parent group. That allows individual limits for a service, instead of sharing the limit set for the parent snap.
An example would be a snap containing a backend system, with multiple services, for instance: backend.api-service backend.logic-service
we can then put the backend
snap into a quota group like this and give it a memory limit we don’t want the snap to exceed (this is shared limit for all services)
snap set-quota test-top --memory=512MB snap-backend
We then want to isolate the logic-service to not consume all of the memory, by seperating that service into it’s own, specific quota group with a memory limit of 128MB
snap set-quota test-sub --parent=test-top --memory=128MB snap-backend.logic-service