lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Simultaneous GET requests to HTTP Server


From: Noam Weissman
Subject: Re: [lwip-users] Simultaneous GET requests to HTTP Server
Date: Fri, 16 Jun 2017 12:08:32 +0000

Hi,


Just a small addition to my earlier message. Because ETH communication normally uses

interrupts + DMA that means that some of the data transfer is not handled by the micro.

That said means that even that we have one simple micro it is capable of handling several

connections in "parallel".


Have a great weekend, all you out there 😊

Noam.




From: lwip-users <lwip-users-bounces+address@hidden> on behalf of Simeon Trifonov <address@hidden>
Sent: Friday, June 16, 2017 2:45 PM
To: address@hidden
Subject: Re: [lwip-users] Simultaneous GET requests to HTTP Server
 

But my problems are not with slow reaction, but with hanging communication. For my point of view, the communication with my device runs quite fast, even if I limit the browser to send only one GET request at a time. So I don't search a possibility to accelerate the communication. I just want to give the possibility to the user to work with the default settings of the browser (that means 6 parallel connections for Firefox).


Simeon


On 16.6.2017 г. 14:18 ч., Noam Weissman wrote:

Hi Antonio,


RAW mode API is meant to be used in systems without an OS or if you use an OS

in one task, dedicated to TCP stack.


Sure one connection is handled at a time because you have one micro that is able

to run only one command at a time.


Using threads actually worsen the situation because you have the OS scheduler

that also needs some CPU time.


If your RAW API WEB server runs slow you have some configuration or code issue.

I do not think it should run much slower than a threaded server, maybe even faster.


I think that the only impact on performance comes from memory usage. If you run

a threaded server and do memory allocations (large buffers) you can definitely write

code that is much more deficient. The efficiency will come from simpler parsing of

data, less memory copying etc...


The LwIP RAW mode server that is spread around is able to run on systems with very

limited memory. It runs well but it is a bit slow.


The speed issues comes from the way it handles data (files) and the small buffers,

not because it uses call-backs instead of threads.


This is my observation 😊



BR,

Noam.





From: lwip-users <lwip-users-bounces+address@hidden> on behalf of Antonio Gonga <address@hidden>
Sent: Friday, June 16, 2017 1:54 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Simultaneous GET requests to HTTP Server
 
Hi Simeon,

I am not sure but I believe, the server does not send anything because it still processing the first request when the others arrive.

Q: Did you try to use threads in your server ? For example I had developed one multi-thread HTTP server using LWIP-1.4 and I was able to have many HTTP requests and high rate pings (ping -i 0.2 a.b.c.d), and the server was capable of handling my requests..
Essentially, for each accept return, you create a new thread to handle that request.


---
Best Regards,
António Gonga, KTH Sweden
-------------------------

________________________________________
From: lwip-users <lwip-users-bounces+address@hidden> on behalf of Simeon Trifonov <address@hidden>
Sent: Friday, June 16, 2017 11:08
To: address@hidden
Subject: [lwip-users] Simultaneous GET requests to HTTP Server

Hello,

I need some help about the usage of the HTTP Server. My current problem
is the following. I have some WEB pages that use some styles,
_javascript_s, pictures as usual. When I set an option to the WEB Browser
(up to now I use always Firefox) to make only one GET request at a time,
all works without any problems. But by default the simultaneous requests
of the browser are set to 6. In this case, index page is loaded correct,
then the browser generates simultaneous GET requests to read a style and
a _javascript_ and at this point the communication brakes - I see that the
HTTP Server stops sending the next frames with the data of the files. It
happens the same if the simultaneous requests are even 2. So it works
only if the requests are following one after another. I suppose that
this is something in my code, or more usual in some settings of the
stack or HTTP Server, but I can't find out what is it. I'm using LWIP
stack V1.4.1. Can you give me an advice what I have to check, please?

Best regards!

--
Simeon Trifonov
Head of department "Development"

AMK Drives and Controls Ltd.
Bulgaria / Gabrovo

Phone:   +359 (0)66 819125
Fax:     +359 (0)66 819101
E-Mail:  address@hidden
Web:     www.amk-drives.bg


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
lists.nongnu.org
Welcome to the lwip-users mailing list. Use it to ask questions, share your experience and discuss new ideas. To see the collection of prior postings to the list ...


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
lists.nongnu.org
Welcome to the lwip-users mailing list. Use it to ask questions, share your experience and discuss new ideas. To see the collection of prior postings to the list ...



_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

-- 
Simeon Trifonov
Head of department "Development"

AMK Drives and Controls Ltd.
Bulgaria / Gabrovo

Phone:   +359 (0)66 819125
Fax:     +359 (0)66 819101
E-Mail:  address@hidden
Web:     www.amk-drives.bg


reply via email to

[Prev in Thread] Current Thread [Next in Thread]