Mysterious netio result between Release and Debug mode on 52259Demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mysterious netio result between Release and Debug mode on 52259Demo

2,106 Views
bamtti
Contributor I

I'm testing the TCP/IP performance on 52259Demo board using RTCS. And connect the PC and
52259 Demo board using a switching hub. Demo board is programmed netio and start
using DHCP client(192.168.0.8).

I execute the netio program twice in PC. The first one is the result in release mode compiled and the last one is in debug mode compiled (refer next captured text).

 

==============Command Prompt screen ========================= 

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

TCP connection established.

Packet size  1k bytes:  2161 KByte/s Tx,  25214 Byte/s Rx.

Packet size  2k bytes:  1211 KByte/s Tx,  29990 Byte/s Rx.

Packet size  4k bytes:  2281 KByte/s Tx,  20855 Byte/s Rx.

Packet size  8k bytes:  3676 KByte/s Tx,  20855 Byte/s Rx.

Packet size 16k bytes:  3971 KByte/s Tx,  55053 Byte/s Rx.

Packet size 32k bytes:

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

D:\Ckyu\E2S\FW\NetIO\netio126\bin>win32-i386.exe -t 192.168.0.8

 

NETIO - Network Throughput Benchmark, Version 1.26

(C) 1997-2005 Kai Uwe Rommel

 

TCP connection established.

Packet size  1k bytes:  578 KByte/s Tx,  24827 Byte/s Rx.

Packet size  2k bytes:  811 KByte/s Tx,  588 KByte/s Rx.

Packet size  4k bytes:  964 KByte/s Tx,  628 KByte/s Rx.

Packet size  8k bytes:  2308 KByte/s Tx,  663 KByte/s Rx.

Packet size 16k bytes:  1809 KByte/s Tx,  1167 KByte/s Rx.

Packet size 32k bytes:

D:\Ckyu\E2S\FW\NetIO\netio126\bin> 

========================================================== 



 

At that time in demo board, send() functions always returns 0, except only at first one time.

And it have no relation release or debug mode. 

If packet size is 1k bytes then I saw the message "Send:1024".

Next image is captured for send() funcation's fail situation at the end of above simulation.


============Hyper-Term screen =============================== 

Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384
Send : 16384

Receiving from client, packet size 32k ...

========================================================== 

 

Above message comes from next source.



             else if (ctl.cmd == CMD_S2C)

             {

                           printf("\nSending to client, packet size %s ... ", PacketSize(ctl.data));

                           cBuffer[0] = 0;

                           nData = 0;

                           send_time =RTCS_time_get() + SEND_TIMEOUT;

                           while(RTCS_time_get() < send_time)

                           {

                                        for (nByte = 0; nByte < ctl.data; )

                                        {

                                                     rc = send(client, cBuffer + nByte, ctl.data - nByte, 0);

                                                     if (rc < 0 )

                                                     {

                                                                  puts("netio:send() failed");

                                                                  break;

                                                     }

                                                     if (rc > 0)

                                                                  nByte += rc;

 

                                                     printf("Send : %d\n", nByte);

                                        }

                                        nData += ctl.data;

                           }

                           cBuffer[0] = 1;

                           if (send_data(client, cBuffer, ctl.data, 0))

                                        break;

             }

             else /* quit */

                           break;




My question is

  1)      Why Debug mode Tx bytes is larger than that of release mode in Demo board?

  2)      Why send() returns 0 always, except for the first time.

 

Regards. 

Message Edited by bamtti on 2009-09-15 03:37 PM
Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

586 Views
EAI
Contributor IV

 In release mode, the code is optimized, so you should get better performance.

 

Keep in mind that the default configuration parameters for RTCS on the 52259 are for saving space, at the expense of throughput. You can acheive faster througput by increasing the TCP window sizes and number of buffers available to the ethernet driver.

 

My numbers in debug mode on the 52259 are:

Packet size  1k bytes:  355 KByte/s Tx,  254 KByte/s Rx.Packet size  2k bytes:  513 KByte/s Tx,  1150 KByte/s Rx.Packet size  4k bytes:  519 KByte/s Tx,  1633 KByte/s Rx.Packet size  8k bytes:  873 KByte/s Tx,  2005 KByte/s Rx.Packet size 16k bytes:  1313 KByte/s Tx,  2107 KByte/s Rx.

 

586 Views
bamtti
Contributor I

Thank you for your benchmark post.

And I got a hint from it.

 

But I still have a question on return value of send() function.

Have you ever seen such a case on RTCS?

 

Regards. 

0 Kudos
Reply