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? */
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.
> 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
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
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.
> 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
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