Liron Aravot has posted comments on this change.

Change subject: core: attach device ioTune map
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

http://gerrit.ovirt.org/#/c/29816/2/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java:

Line 355:         }
Line 356: 
Line 357:         ArchStrategyFactory.getStrategy(vm.getClusterArch()).run(new 
CreateAdditionalControllers(devices));
Line 358:     }
Line 359: 
this should be done also when hotplugging a disk to vm, take a look in 
HotPlugDiskVDSCommand
Line 360:     private Map<String, Integer> buildIoTune(DiskImage diskImage) {
Line 361:         Guid diskProfileId = diskImage.getDiskProfileId();
Line 362:         if (diskProfileId == null) {
Line 363:             return null;


Line 356: 
Line 357:         ArchStrategyFactory.getStrategy(vm.getClusterArch()).run(new 
CreateAdditionalControllers(devices));
Line 358:     }
Line 359: 
Line 360:     private Map<String, Integer> buildIoTune(DiskImage diskImage) {
Please cache the already loaded data and use it for the other vm disks if 
needed. 
Most of the times the vm disks will use the same profile (we have have a 
default profile) - so there's no need to perform for each disk 2 queries when 
we already loaded the needed data.
Line 361:         Guid diskProfileId = diskImage.getDiskProfileId();
Line 362:         if (diskProfileId == null) {
Line 363:             return null;
Line 364:         }


Line 365:         StorageQos storageQos = 
DbFacade.getInstance().getStorageQosDao().getByDiskProfile(diskProfileId);
Line 366:         if (storageQos == null) {
Line 367:             return null;
Line 368:         }
Line 369:         // build map
is this supported on any vdsm/libvirt version? i don't want this to cause any 
regressions when used with earlier versions.
Line 370:         Map<String, Integer> ioTuneMap = new HashMap<>();
Line 371:         if (storageQos.getMaxThroughput() != null) {
Line 372:             ioTuneMap.put(VdsProperties.TotalBytesSec, 
storageQos.getMaxThroughput());
Line 373:         }


-- 
To view, visit http://gerrit.ovirt.org/29816
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I515caa7ff8996711610a77a57d6683d2655545de
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to