Bug 1751423
Summary: | Improve description of shared memory statistics and remove unimplemented memory metrics from API | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Germano Veit Michel <gveitmic> |
Component: | ovirt-engine | Assignee: | Ori Liel <oliel> |
Status: | CLOSED ERRATA | QA Contact: | Guilherme Santos <gdeolive> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 4.3.5 | CC: | michal.skrivanek, mperina, msivak, mwest, mzamazal, pelauter, royoung, sradco |
Target Milestone: | ovirt-4.4.0 | Flags: | lsvaty:
testing_plan_complete-
|
Target Release: | 4.4.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-08-04 13:20:47 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1758067 | ||
Bug Blocks: |
Description
Germano Veit Michel
2019-09-12 00:48:24 UTC
Apparently this never worked. The API has always returned 0 for these statistics, traced back to the first version of oVirt (in HostStatisticalQuery.java). The Engine also does not have any reference to these statistics, traced back to the first version of oVirt (VdsStatistics.java, VdsBrokerObjectsBuilder.java) VDSM has marked memory.buffers memory.cached as deprecated (vdsm-api.yml). No reference to cached swap was found in my search. If these statistics are meaningful to users they should be fetched by VDSM and propagated all the way up to the API. If not, they should be deprecated in the Engine like they were in VDSM and eventually removed. Seems like a PM decision Well, I'm not a PM :-), so I can't say much to it. Please note the two deprecated items are in guest stats, not host stats. It seems the requested host stats items are indeed not handled by Vdsm at all. I'm not aware about any plans to add them altough we can add them if they are needed. Got you. Thanks for asserting that VSDM does not handle these stats About: "memory.share - Looking at the code, this seems to be memory shared by KSM and not shared as in 'free -m', update description?" Can you please give a link to the location in the code that you are referring to? Giving another name is rather easy (e.g: memory.ksm_shared) but we need to be sure that fetching the ksm shared memory rather than the regular shared memory is done by design, meaning that it is not in itself a bug. To summarize: 1) memory.buffers memory.cached swap.cached were never retrieved by VDSM or referenced in the Engine, and REST-API has always returned 0 for them. To return valid values, an RFE should be opened to VDSM (note that changes would be made only to versions 4.3/4.4) A PM decision is required as to whether these should be handled properly or dropped. Keep in mind that these metrics might be included in Metrics Store, which would make reporting them by oVirt possibly redundant. 2) memory.shared It seems like ksm-shared-memory (vs regular shared memory) is fetched by design and not by mistake (https://github.com/oVirt/vdsm/blob/master/lib/vdsm/momIF.py#L113) So this metric should indeed be described better. I suggest changing the description and not the name for backwards compatibility reasons. Martin, what would be the most accurate description of ksm-shared-memory? The above metrics are reported as part on the RHV metrics store. (In reply to Ori Liel from comment #6) > Martin, what would be the most accurate description of ksm-shared-memory? Not sure how to frame it correctly as I do not remember the exact value we are reporting. But the kernel docs say: """ The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: pages_shared - how many shared pages are being used pages_sharing - how many more sites are sharing them i.e. how much saved A high ratio of pages_sharing to pages_shared indicates good sharing, but a high ratio of pages_unshared to pages_sharing indicates wasted effort. """ Opened an RFE for VDSM: https://bugzilla.redhat.com/1758067 OK, changing title of the bug, we will improve documentation of shared memory metric in API and remove un-implemented memory metrics from API, because they should be fetched from metrics store and not from engine. About memory.shared, the value reported is: stats['ksm_pages_sharing'] * PAGE_SIZE_BYTES (see https://github.com/oVirt/vdsm/blob/master/lib/vdsm/momIF.py#L113) Therefore I will change the description to: "The amount of memory, in bytes, shared among Virtual-Machines on this Host (KSM)" small correction: memory.shared = "The amount of memory, in bytes, shared among Virtual-Machines on this Host by Kernel Same-page Merging (KSM)" WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops Verified on: ovirt-engine-4.4.0-0.20.master.el7.noarch Steps: 1. # curl -X GET -H 'All-content: true' -H "Accept: application/xml" -u admin@internal:<password> --insecure https://<engine-fqdn>/ovirt-engine/api/hosts/<host-id>/statistics Results: No more memory.buffers, memory.cached and swap.cached fields; memory.shared description shown according with comment #17 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:3247 |