Feature #553
Add cache option to disk definition.
| Status: | Closed | Start date: | 03/31/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | - | |||
| Target version: | Release 3.0 | |||
| Resolution: | fixed | Pull request: | 
Description
In some circumstances performance is very imported.
Unfortunately, virtual block device performance is not impressing, especially when working with qcow2 images.
It can be improved using "cache='writeback'" option.
So, please add cache parameter do block device definition.
It could be something like:
DISK = [IMAGE="image", CACHE='writeback']
Associated revisions
feature #553: Added cache attribute for DISK in the KVM driver
Oned: Fix typo in help (#553)
Oned: Fix typo in help (#553)
(cherry picked from commit fa727a7e13549d83743be4332c3a221761c62556)
History
#1
     Updated by jordan pittier about 10 years ago
    Updated by jordan pittier about 10 years ago
    Here's the patch :
Edit src/vmm/LibVirtDriverKVM.cc, add around line 56
string cache = ""; string default_driver_cache = "";
Edit src/vmm/LibVirtDriverKVM.cc, add around line 274
get_default("DISK","CACHE",default_driver_cache);
if (default_driver_cache.empty())
{
   default_driver_cache = "default";
}
	Edit src/vmm/LibVirtDriverKVM.cc, add around line 295
cache = disk->vector_value("CACHE");
	Edit the same file, starting from line 372 (considering the new line added above). The file should look like
        // ---- Image Format using qemu driver ----
        file << "\t\t\t<driver name='qemu' type='";
        if ( !driver.empty() )
        {
            file << driver << "'";
        }
        else
        {
            file << default_driver << "'";
        }
        file << " cache='";
        if ( !cache.empty() )
        {
            file << cache << "'/>" << endl;
        }
        else
        {
            file << default_driver_cache << "'/>" << endl;
        }
        file << "\t\t</disk>" << endl;
	Finaly edit one/etc/vmm_ssh/vmm_ssh_kvm.conf and add something like :
DISK = [ driver = "raw", cache = "writeback" ]
#2
     Updated by Ruben S. Montero about 10 years ago
    Updated by Ruben S. Montero about 10 years ago
    - Assignee set to Ruben S. Montero
- Target version set to Release 3.0
Hi,
The patch seems ok. Thanks for this :) I've schedule this feature for the next release
Ruben
#3
     Updated by Ruben S. Montero about 10 years ago
    Updated by Ruben S. Montero about 10 years ago
    - Status changed from New to Closed
- Resolution set to fixed
Changes in master as described here. Documentation also updated