[pve-devel] [PATCH 2/2] dynamically adjust interval based on last runtime
Stefan Priebe
s.priebe at profihost.ag
Wed Oct 9 09:29:51 CEST 2013
Am 09.10.2013 07:07, schrieb Dietmar Maurer:
>> Am 08.10.2013 10:44, schrieb Dietmar Maurer:
>>>> But right now there is no callback in:
>>>> PVE.data.UpdateQueue.queue
>>>
>>> It is not very hard to add one ;-)
>>
>> If you're familiar with JS it def. isn't ;-)
>
> Sure. I just committed a patch to implement that callback:
>
> https://git.proxmox.com/?p=pve-manager.git;a=commit;h=962a7b82104f2fcdfdf5a6a180054dd617e7b9f2
>
> Please can you rewrite your patch?
>
> You currently use:
>
> interval = config.interval + (me.updateruntime*2);
>
> I wonder if it would be better to use fixed delays, something like:
>
> if (runtime > 500) interval = interval*2;
>
> what values do you get for 'updateruntime'?
I get values between 500ms and 5s depending on connection. One of the
biggest problems seems to be the tasks and ressources list. Both of them
have gzip compressed 25kb and pve requests them very often.
Wouldn't it be possible to have something like:
- get cluster version
- if cluster version > oldcluster version:
get ressources
else
*do nothing*
Just requesting a version number would be very fast even on slow
connections and ExtJS does not need to rerender "old" data.
Maybe something like this is for the task list also possible like
sending the newest known task and the server checks whether there are
newer ones available.
Greets,
Stefan
More information about the pve-devel
mailing list