CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Webserver - file upload speed

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nazoa



Joined: 09 Feb 2007
Posts: 56

View user's profile Send private message

Webserver - file upload speed
PostPosted: Thu Apr 17, 2008 11:36 am     Reply with quote

I have a project using the PIC18F97J60 running at 41.6M. To try things out I am using the webserver2 example provided with the ethernet kit. It works fine but the speed is really quite slow, specially uploading image files. A simple 3K gif file takes about 3 seconds.

Apart from reducing the file size, has anyone got any tips / suggestions for improving the speed? I am storing the files in program memory using the MPFS provided with the ethernet kit.

Thanks
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Thu Apr 17, 2008 11:43 am     Reply with quote

Write speed is slow for program memory. An SD card would provide much faster write storage speed and somewhat slower read speed.
nazoa



Joined: 09 Feb 2007
Posts: 56

View user's profile Send private message

PostPosted: Thu Apr 17, 2008 12:52 pm     Reply with quote

I think my problem is the other way around. Reading data from program memory for uploading to the client is very slow.
Dimmu



Joined: 01 Jul 2007
Posts: 37

View user's profile Send private message

PostPosted: Thu Apr 17, 2008 12:56 pm     Reply with quote

Hi,

I made some tests on download ( from PIC to PC ) with the TCP-IP stack few weeks ago and the download rate was never better than ~4 k/s. I placed some trigger points in the PIC and discovered that the faulty element was not the PIC but the computer + hub.

Since the stack sends only one message then waits for the ACK, the download rate was limited to 1 kb/message exchange with the PC and it was not possible to get better results than 1 message / 250 ms.

The solution is to modify the stack to send more than one message at the time and then monitor the incoming ACK for message lost ( what I plan to do later but I don't know when )


Dimmu
nazoa



Joined: 09 Feb 2007
Posts: 56

View user's profile Send private message

PostPosted: Sat Apr 19, 2008 7:06 am     Reply with quote

You are right Dimmu. I had a look at the traffic using the Wireshark programme and the PIC always waits for an acknowledge before sending another packet. In some cases it takes 1 or 2 seconds for the acknowledgement to come.

Well, I would be very interested to hear of anyone who has modified the stack to send multiple messages.

Thanks.
Dimmu



Joined: 01 Jul 2007
Posts: 37

View user's profile Send private message

PostPosted: Sun Apr 20, 2008 3:50 am     Reply with quote

I think that it is possible to configure the stack to send all messages without waiting for the ACK. In this case the communication must be faster but you lose all security on communication.

Make a search for the next : "TCP_NO_WAIT_FOR_ACK"

Dimmu
nazoa



Joined: 09 Feb 2007
Posts: 56

View user's profile Send private message

PostPosted: Mon Apr 21, 2008 11:24 am     Reply with quote

Good suggestion but unfortunately it does not work too well. What happens is that a lot of packets with check sum errors are generated and the downloading takes just as long. I think there may be an bug somewhere in the stack code.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group