Bug 1304346
| Summary: | [RFE] Prepare a method to compute (guess) the required memory for starting a VM | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Martin Sivák <msivak> |
| Component: | BLL.Virt | Assignee: | Milan Zamazal <mzamazal> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Israel Pinto <ipinto> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.0.0 | CC: | bugs, hannsj_uhl, mavital, mgoldboi, michal.skrivanek, msivak, rgolan, sbonazzo, s.kieske |
| Target Milestone: | ovirt-4.0.0-beta | Keywords: | CodeChange, FutureFeature |
| Target Release: | 4.0.0 | Flags: | rule-engine:
ovirt-4.0.0+
mavital: testing_plan_complete? mgoldboi: planning_ack+ michal.skrivanek: devel_ack+ mavital: testing_ack+ |
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-08-03 11:16:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1304300, 1308609, 1362557 | ||
|
Description
Martin Sivák
2016-02-03 11:42:52 UTC
please coordinate with SLA please pay special attention to ppc64le where things are a bit different we should be able to come up with something better than 65MB hardcoded in 4.0 for sure, maybe won't be perfect, but anything is better than that:) Libvirt documentation says that the overhead of QEMU itself "is hard to determine so one needs guess and try". We follow that advice here. Based on various experiments and measurements I suggest the following formula: fixed + video + mem_coeff * memory + 8 * cpu + 8 * iothreads where - fixed is 64 MB on x86_64, and 100 MB on Power - video is amount of the video RAM allocated to the VM; it equals to `ram + vram' where ram and vram are values computed and set by Engine - mem_coeff is 1/512 on x86_64 and 1/64 on Power - memory is current VM memory on x86_64, and maximum possible VM memory (i.e. including amount for hotplug) rounded to the nearest higher or equal power of 2 on Power - cpu is number of active CPU units (including cores and threads) - iothreads is number of allocated IOThreads (0 if IOThreads are not enabled) Please note that it is really based on the "guess and try" approach and the values are generally only approximate. We may find out that the values are not optimum ones (in either direction) or that something is missing in the formula. So we may need to adjust the formula in future based on newly acquired knowledge. For now, the computed value should be better than the current fixed 65 MB value and it should be probably on the conservative side (i.e. higher rather than lower). Minor correction of the formula -- missing units: fixed + video + mem_coeff * memory + 8 MB * cpu + 8 MB * iothreads Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA. There is a new method VmUtils.getTotalRequiredMemoryInMb available now that returns the whole memory requirements guess for the given VM (i.e. VM memory + all the overheads). Check with engine version 4.0.2.3-0.1.el7ev Steps: Run automation virt sanity the check nothing is broken with the code Resutls: PASS method is ready in 4.0 |