Skip to content

Wrong resource usage often reported in multiple area #8927

Closed

Description

@levindecaro
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Resource Usage
CLOUDSTACK VERSION
4.19
CONFIGURATION

KVM
Advanced Networking
resource.count.running.vms.only=true

OS / ENVIRONMENT

CentOS 7
Oracle Linux 9
KVM

SUMMARY

Multiple user account reports CPU count not released after VM stopped/expunged and inaccurate secondary storage usage reported over time. There are no error been found in management server logs.

STEPS TO REPRODUCE
Spin up vm instance, stop it and delete it.
Create volume snapshot and delete it.
EXPECTED RESULTS
Resource limit usage should be updated and reflect to actual usage, and reconciliation should perform in regular basis. 
ACTUAL RESULTS
Resource count is inaccurate.

Activity

  1. vishesh92 commented on Apr 17, 2024

    @vishesh92
    Member

    @levindecaro There is a regular task which reconciles the limits. The period for this task is controlled by resourcecount.check.interval.
    There are a few PRs which were merged recently which help reduce the discrepancies and speed up the resource count calculation as well.
    #8302
    #8903

    Over multiple operations there can be some discrepancies. But the regular resource count check should resolve that. Complete solving this requires a complete refactor of the current implementation or adding more locks which can impact the scalability of ACS itself.

  2. levindecaro commented on Apr 17, 2024

    @levindecaro
    ContributorAuthor

    @vishesh92 I have resourcecount.check.interval=300 inplace, but seems not help for this discrepancies problem.

  3. rajujith commented on Apr 22, 2024

    @rajujith
    Contributor

    @levindecaro have you tried updating resource count for the account after deleting the VM as a workaround?

  4. levindecaro commented on Apr 22, 2024

    @levindecaro
    ContributorAuthor

    @rajujith i did, but doesn't help

  5. DaanHoogland commented on Apr 24, 2024

    @DaanHoogland
    Contributor

    @levindecaro , several queries (and possible actions)

    • is this an intermitted issue or consequent?
    • if this is really an issue with usage; for those resources you can check the events in the events table to see if some events were missed. You can enter them manually.
    • it sounds though like it is an issue with quota only, is that correct?
    • do you see chance to test , in a test environment, with the PRs @vishesh92 refers?
  6. levindecaro commented on Apr 24, 2024

    @levindecaro
    ContributorAuthor

    @DaanHoogland

    So far, I heard it is a intermitted issue from users, when they do some excess create/start/stop/destroy VM within a short period. After hours, the resource never went down, so i need to recalculate their used resource and update db table manually to solve this problem.

    For the snapshot usage from secondary storage, there are nothing listed in volume snapshot, but resource limit page shown there are consumed spaces.

    I'm no idea how to sort out it is a actual used space or just a orphan record.

  7. added this to the unplanned milestone on Apr 30, 2024
  8. github-actions commented on Dec 29, 2025

    @github-actions

    This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.

  9. locked and limited conversation to collaborators on Dec 29, 2025
  10. converted this issue into a discussion #12345 on Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions