Operating System - HP-UX
1820195 Members
3852 Online
109620 Solutions
New Discussion юеВ

Data transmission problem

 
Patrick Chim
Trusted Contributor

Data transmission problem

Hi all,

I have a PC client program (Delphi) running in Windows to simulate the FTP process and transmit a file to HP Server running 11.0 which there is a program (Java) in server side to receive the file. Here comes the question.

With the data capture from the network, it shows that the transfer rate is only about 4k bytes per second when using the PC client program. But if I transfer the same file through Windows' FTP to server, the transfer rate is up to 1.X M bytes per second. The connection between the client program to server is through tcp socket. How comes the large difference between them ? Is it possible to change the default socket size (if it exists) ?

Regards,
Patrick
3 REPLIES 3
Ravi_8
Honored Contributor

Re: Data transmission problem

Hi,
In your client program socket it is defined to hold some amount data, so after the data has been transmitted client fetches again hold and transmit again, this process continue till all the data get transfered. but in ftp data will be stored in buffer and transmit is fast.
confirm with vendor what type of socket they used in client. if it is stream socket transfer rate will be more than datagram socket.
never give up
Klaus Crusius
Trusted Contributor

Re: Data transmission problem


There is no "socket size". Nevertheless the protocols below IP cut the stream into chunks of typically 1460 bytes for ethernet. This restriction is valid for FTP as well as for your protocol, so the difference must be elsewhere.
I can imagine, that the sending process sends a lot of tiny chunks much smaller than 1k, and what you observe is network overhead. In a C-program, you would used a buffered output to a stream file descriptor (fdopen(), fprintf(), ...) or be careful to send only big chunks of data at a time.
You should look in the Delphi environment for similar options.
In your Java program, you should be able to put a trace outpout showing you, at which times the individual bytes arrive.

Hope that helps, Klaus
There is a live before death!
Brian Hackley
Honored Contributor

Re: Data transmission problem

Patrick,

The FTP numbers can be misleading, especially when the file size is small. If the file fits into bufferecache, that skews the FTP performance numbers even further. In general we tell people looking at network performance to use public domain tools such as ttcp (http://www.faqs.org/faqs/hp/hpux-faq/section-213.html)or netperf (http://www.netperf.org).

Additionally, HP supplies some code examples that you might want to review for further tips to determine what the story is with your socket program. Look in /usr/lib/demos/networking/socket on any HP-UX box.
Lastly, excellent programming reference available for HP-UX: http://docs.hp.com -> Networking and Communications -> LAN/9000 -> BSD Sockets Interface Programmer's Guide (HP-UX 10.x, HP-UX 11.0)

Hope all this helps,

-> Brian Hackley
Ask me about telecommuting!