[Spice-devel] [PATCH spice-protocol 2/2] Add qos related messages
Yonit Halperin
yhalperi at redhat.com
Tue Apr 10 03:09:20 PDT 2012
On 04/10/2012 12:25 PM, Marc-André Lureau wrote:
> Hi
>
> On Tue, Apr 10, 2012 at 11:19 AM, Yonit Halperin<yhalperi at redhat.com> wrote:
>> On 04/10/2012 12:13 PM, Marc-André Lureau wrote:
>>>
>>> On Sun, Apr 8, 2012 at 5:42 PM, Yonit Halperin<yhalperi at redhat.com>
>>> wrote:
>>>>
>>>> If the client's channel has SPICE_COMMON_CAP_QOS_QUERY,
>>>> the server's channel can send SPICE_MSG_QOS_QUERY to the client.
>>>> In response, the client is expected to send back SPICE_MSG_QOS_ACK
>>>> immediately after it receives the message following the query, and
>>>> before handling the message. The server can deduce
>>>> the network condition using the ack arrival time.
>>>
>>>
>>> Can it deduce other things than latency with this query?
>>>
>> You can deduce the bit rate, the ack is expected only after receiving the
>> message following the QOS_QUERY. So you can send the QOS_QUERY just before
>> you are about to send a large message.
>>
>
> When you send QOS_QUERY, how do you know how much data is about to be
> send? there could be data buffer locally, in process, in kernel, in
> net hardware, in the network, in the client etc...
>
> Wouldn't it be more reliable to put the QOS_QUERY in front of the data
> to send, specifying the amount of data that is going to be send, so it
> measures more precisely network bandwith?
>
This is handled in server/red_channel.c
The client doesn't need to know the size evaluated by the server. It
just need to receive one more message and then ack it (before it process
it). The "one more message" is part of the regular stream of the
channel, not a special message.
The server/red_channel.c has an option to periodically send QOS_QUERY,
but it does it only when it encounters a big message. Then it remembers
the message size + the size pending in the tcp send buffer
(ioctl(TIOCOUTQ)). It sends the QOS query before the "big message". The
client sends the ack after it receives the "big message". When the ack
is received, this size is used for the bit rate calculation.
Regards,
Yonit.
More information about the Spice-devel
mailing list