Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

from static library to sockets on localhost

4 views
Skip to first unread message

canvas_remix

unread,
Sep 16, 2007, 4:21:55 AM9/16/07
to
Hi,

We had a library linked dynamically in our 32 bit mode.
Now due to capacity issues, we are planning to move on to 64 bit but
the library is still 32 bit and
we cannot make it 64 bit without a mammoth effort.
So we decided to use IPC via sockets such that the library calls are
run on a 32 bit machine while
our application runs on a 64 bit machine.
But that is slowing down the things by a factor of say 100.
Is this expected ?

I am using Tcl sockets for this purpose and right now, both the
processes are running on the same machine.
Our application built in 32 bit mode to test the IPC mechanism.

Russell Trleleaven

unread,
Sep 16, 2007, 11:57:05 AM9/16/07
to
OK if i understand correctly you used to call a library and now you do
IPC across a network to another machine to call a library to get the
same results.

If the above assumption is correct then the performance impact could be
huge.
For a synchronous call the difference between making the call locally or
going across a 100 megabit full duplex cross over cable is going to be
microseconds for a local call and milliseconds over the Ethernet which
is a factor of a thousand.

I am ignoring a lot of subtleties but the big problem is the round trip
latency of going down the network stack, across the network, up the
remote network stack, information goes back down the remote network
stack, back across the network and up the local stack.

Sincerely,

ru...@else.net


Gerald W. Lester

unread,
Sep 16, 2007, 12:38:55 PM9/16/07
to

Even if you are running on the same machine and are using the loopback
connector, you are still going through some layers of the network stack and
should expect it to be an order of magnitude or two more overhead than
calling the routine directly.

Now if the called routine is accessing a database or doing I/O or other
things that take a long time, the additionally overhead may be virtually
unnoticeable -- but if the routine does a small computation, then the
overhead will make the routine seem 10 to 100 times slower.

As the previous poster mentioned, going over a network to another machine
adds more overhead.

0 new messages