[vbox-dev] Updating network interfaces list speed-up

Klaus Espenlaub klaus.espenlaub at oracle.com
Tue Apr 14 19:33:01 GMT 2015


Hi Alexander,

5.0.0BETA2 will contain a modification inspired by your patch, which 
should actually lower the time during which the lock is held even further.

There would be ways to optimize it much further (I left a todo comment 
in the code hinting what needs doing and what the difficulties are), but 
decided against doing it now.

Klaus

On 08.04.2015 14:32, a.urakov at drweb.com wrote:
> Hello,
>
> I just want to remind about this patch...
>
> Regards,
> Alexander
>
> 25.02.2015 16:16, a.urakov at drweb.com пишет:
>> Hello!
>>
>> We would like to contribute to VirtualBox under MIT license. We want 
>> to suggest our changes for multiple VMs starting speed-up.
>>
>> The basic idea is to take out getting of host interfaces from write 
>> lock on host object. When many VMs are starting at the same time then 
>> /FindHostNetworkInterfaceByName/ is called for every machine and it 
>> updates network interfaces. So if umount of VMs is large enough then 
>> execution time of this function greatly increases due to lock wait.
>>
>> There are two /VBoxSVC/ logs in attach: before applying our changes 
>> and after it. In every case we started 80 VMs at the same time. 
>> Statistic of /FindHostNetworkInterfaceByName/ execution time before 
>> changes is:
>>
>> Min: 0.38 s (nspr-31)
>> Med: 14.13 s (nspr-82)
>> Max: 37.70 s (nspr-188)
>> Avg: 15.07 s
>>
>> Statistic after changes is:
>>
>> Min: 1.12 s (nspr-85)
>> Med: 6.56 s (nspr-228)
>> Max: 17.27 s (nspr-7)
>> Avg: 5.82 s
>>
>> Regards,
>> Alexander 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150414/6536809b/attachment.html>


More information about the vbox-dev mailing list