[pve-devel] vm_copy : running vm copy for proxmox 3.0 ?
    Alexandre DERUMIER 
    aderumier at odiso.com
       
    Fri May  3 13:15:31 CEST 2013
    
    
  
thanks Michael, 
I'll try your code next week.
I'll do a drive-mirror test, with a fio stress benchmark with a lot of ios, to overload my storage.
----- Mail original ----- 
De: "Michael Rasmussen" <mir at datanom.net> 
À: "Alexandre DERUMIER" <aderumier at odiso.com>, "Dietmar Maurer" <dietmar at proxmox.com>, pve-devel at pve.proxmox.com 
Envoyé: Vendredi 3 Mai 2013 00:59:56 
Objet: Re: [pve-devel] vm_copy : running vm copy for proxmox 3.0 ? 
Hi all, 
On Thu, 02 May 2013 18:34:10 +0200 (CEST) 
Alexandre DERUMIER <aderumier at odiso.com> wrote: 
> 
> Maybe can we compute average source new writes (ios ? bandwith ?), or something like that, and decrease progressively the ios or bandwith. 
> I need to think about that a little more. 
> 
I have given this some thoughts and I think it could be implemented 
this way: 
my $max_bps_wr = get_target_max_bps_wr($target); 
my $bps_wr = $max_bps_wr; 
my $new_bps_wr = 0; 
my $timer = 0; 
eval { 
while (1) { 
my $elapsed = time() - $timer 
if ($elapsed < $timer) { 
$new_bps_wr = $bps_wr * 0.9; 
if ($new_bps_wr <= ($max_bps_wr * 0.1) { 
die "Target $target is to congested"; 
} 
} 
else { 
$new_bps_wr = $bps_wr * 1.05; 
if ($new_bps_wr > $max_bps_wr) { 
$new_bps_wr = $max_bps_wr; 
} 
} 
$timer = $elapsed; 
$bps_wr = $new_bps_wr; 
PVE::QemuServer::qemu_block_set_io_throttle( 
$vmid, $target, 0, 0, $new_bps_wr); 
# do other migration stuff 
} 
}; 
do { 
my $err = $@; 
PVE::QemuServer::qemu_block_set_io_throttle( 
$vmid, $target, 0, 0, 0); 
# do other error stuff 
die $err; 
} if $@; 
PVE::QemuServer::qemu_block_set_io_throttle($vmid, $target, 0, 0, 0); 
-- 
Hilsen/Regards 
Michael Rasmussen 
Get my public GnuPG keys: 
michael <at> rasmussen <dot> cc 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E 
mir <at> datanom <dot> net 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C 
mir <at> miras <dot> org 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 
-------------------------------------------------------------- 
People think love is an emotion. Love is good sense. 
-- Ken Kesey 
    
    
More information about the pve-devel
mailing list