[coldsync-hackers] very slow network sync

2 views
Skip to first unread message

Andrzej Dzik

unread,
Dec 14, 2004, 5:32:11 AM12/14/04
to coldsync...@googlegroups.com
Hi!

netsync_write_old is very slow in network sync - approx. 10 min on my T3
netsync_write_new - approx. 1 min but not work on Zire(31|72)

Setting TCP_NODELAY on socket help in this situation.
Simply patch below.

regards
Andrzej Dzik

--- PConnection_serial.c.orig Thu Oct 21 00:45:55 2004
+++ PConnection_serial.c Mon Dec 13 13:11:17 2004
@@ -15,6 +15,8 @@
#include <fcntl.h>
#include <termios.h>
#include <errno.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>

#ifndef HAVE_ENODEV
# define ENODEV 999 /* Some hopefully-impossible value */
@@ -732,6 +734,15 @@

tcsetattr(pconn->fd, TCSANOW, &term); /* Make it so */
/* XXX - Error-checking */
+ } else {
+ int flag = 1;
+ int err = setsockopt(pconn->fd,
+ IPPROTO_TCP,
+ TCP_NODELAY,
+ (char *) &flag,
+ sizeof(int));
+ if (err < 0)
+ fprintf(stderr, "Can't set tcp_nodelay\n");
}

/* XXX Should this message go to stderr instead? */

Christophe Beauregard

unread,
Dec 14, 2004, 9:16:29 AM12/14/04
to coldsync...@googlegroups.com
On Tuesday 14 December 2004 05:32, Andrzej Dzik wrote:
> Hi!
>
> netsync_write_old is very slow in network sync - approx. 10 min on my T3
> netsync_write_new - approx. 1 min but not work on Zire(31|72)
>
> Setting TCP_NODELAY on socket help in this situation.

I can see how setting TCP_NODELAY would help the speed of the sync (or any
other RPC-like protocol), but it shouldn't break anything that was already
working. Was the Zire(31|72) working with the old version?

c.

Andrzej Dzik

unread,
Dec 14, 2004, 9:31:41 AM12/14/04
to coldsync...@googlegroups.com
Dnia 12/14/2004 3:16 PM, Użytkownik Christophe Beauregard napisał:

> I can see how setting TCP_NODELAY would help the speed of the sync (or any
> other RPC-like protocol), but it shouldn't break anything that was already
> working. Was the Zire(31|72) working with the old version?
>

Yes, Zire(31|72) need old version netsync_write.
netsync_write_new can't install some prc

Look at http://www.thedotin.net/maillists/coldsync-hackers/msg02313.html

Andrzej Dzik

David A. Desrosiers

unread,
Dec 14, 2004, 10:02:58 AM12/14/04
to coldsync...@googlegroups.com

> Setting TCP_NODELAY on socket help in this situation. Simply patch
> below.

We've had this same exact patch filed against pilot-link also,
by a user over a month ago.

Since we've completely redesigned the back-end of pilot-link
with different buffering and packet handling, we appear to have
obsoleted the need for it. The difference in synchronization with and
without TCP_NODELAY on a 9-minute+ LANSync sync, was only 15 seconds,
very negligable.


David A. Desrosiers
des...@gnu-designs.com
http://gnu-designs.com

Christophe Beauregard

unread,
Dec 14, 2004, 10:20:35 AM12/14/04
to coldsync...@googlegroups.com
On Tuesday 14 December 2004 09:31, Andrzej Dzik wrote:
> Dnia 12/14/2004 3:16 PM, Użytkownik Christophe Beauregard napisał:
> > I can see how setting TCP_NODELAY would help the speed of the sync (or
> > any other RPC-like protocol), but it shouldn't break anything that was
> > already working. Was the Zire(31|72) working with the old version?
>
> Yes, Zire(31|72) need old version netsync_write.

Ah, sorry, I misunderstood. I thought you meant before the TCP_NODELAY patch
and after the TCP_NODELAY patch.

> netsync_write_new can't install some prc

Could I get a copy of that .prc? I recently acquired a Zire72 but I've yet
to encounter anything it can't upload.

c.

Alessandro Zummo

unread,
Dec 14, 2004, 10:59:54 AM12/14/04
to coldsync...@googlegroups.com
On Tue, 14 Dec 2004 10:20:35 -0500
Christophe Beauregard <christophe...@sympatico.ca> wrote:

> On Tuesday 14 December 2004 09:31, Andrzej Dzik wrote:

> > Dnia 12/14/2004 3:16 PM, U_ytkownik Christophe Beauregard napisa_:


> > > I can see how setting TCP_NODELAY would help the speed of the sync (or
> > > any other RPC-like protocol), but it shouldn't break anything that was
> > > already working. Was the Zire(31|72) working with the old version?
> >
> > Yes, Zire(31|72) need old version netsync_write.
>
> Ah, sorry, I misunderstood. I thought you meant before the TCP_NODELAY patch
> and after the TCP_NODELAY patch.
>
> > netsync_write_new can't install some prc
>
> Could I get a copy of that .prc? I recently acquired a Zire72 but I've yet
> to encounter anything it can't upload.


The CVS of coldsync works fine with the 72 due of a patch
I commited a while ago to use the old routine.

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

Andrzej Dzik

unread,
Dec 15, 2004, 5:23:35 AM12/15/04
to coldsync...@googlegroups.com
Dnia 12/14/2004 4:59 PM, Użytkownik Alessandro Zummo napisał:
> The CVS of coldsync works fine with the 72 due of a patch
> I commited a while ago to use the old routine.
>
Yes, but

netsync_write_old without tcp_nodelay - approx. 10 min on my T3


netsync_write_new - approx. 1 min but not work on Zire(31|72)

netsync_write_old with tcp_nodelay - approx. 1 min and work on new Zire

Andrzej Dzik

Reply all
Reply to author
Forward
0 new messages