[Qt-interest] Help with socketpair and QFiles

David Boosalis david.boosalis at gmail.com
Fri Apr 9 17:10:18 CEST 2010


We compare two applications connected to the same server running on the same
cllient desktop.  The not QT application is written in C++ for both its
server and desktop clients, we do not have source code for non Qt apps -
just exectubales. The Qt application using QTcpSpockets starts to lag and
the lag grows by minutes as time goes on, like the data is being queued up.
There is a lot of data going though the system.  If I use QUdpSockets there
is no lag at all, but UDP is not viable at this time.  If I slow down the
data throughput the lag also disappears.  The lag occurs on Windows XP and
maybe Visita. Not sure about Linux desktop

The sockets run in their own thread, and the application memory usage is not
that great, the CPU usage is under 20% by the application.  I am using Qt
4.6.2 on server and desktop, server is Ubuntu Server Edition 9.10 - 64.

I got around it by opening several sockets to server. This is a financial
piece of software with several windows with scrolling data.  Each window
represents some kind of financial model.  So when I put each model (ie
window) with its own socket, the lag goes away, but man does it make my life
complicated.

Why multiple sockets work and one doesn't is the mystery. After all they
share the same network connection. Should it not be that that many tiny
channels ought to equal the throughput of a giant channel which is the sum
of all the tiny channels.

Oh, I did get QLocalSockets running on the server, the issue was race
conditions and the improper use (lack of) of Mutexes.

Thanks for your emails and interest in my problem
-David










On Fri, Apr 9, 2010 at 6:29 AM, Stephen Collyer
<scollyer at netspinner.co.uk>wrote:

> On 9 April 2010 14:12, David Boosalis
>
>
>
>> My experience with QTcpSockets across a network, where I got huge time
>> lags compared to native Sockets, told me to to stay away from it.
>
>
> Can you expand on this ? Under what circumstances were you getting time
> lags ? How did you measure it ?
>
>
>>   But maybe QTcpSockets revert to a AF_UNIX socket (shared memory ?) when
>> impemented locally.
>>
>> I don't think this is the case, but I'm sure Thiago will be along to
> correct me if I'm wrong.
>
> --
> Stephen Collyer
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100409/a8f38e23/attachment.html 


More information about the Qt-interest-old mailing list