I am NOT comparing the static files and dynamic requests. I was just
illustrating the behaviour I am expecting wrt concurrency. I understand how
Linux kernel and Apache works to some extent.
All I am trying to do is *25* light concurrent requests [in which
controller looks like the following] with decent response time. Currently
it is going down to 5-6 seconds. Is it an absurd expectation on a 4 core,
16G machine?
def controller():
return
Saurabh
On Tue, Nov 26, 2013 at 10:06 PM, Ricardo Pedroso <[email protected]>wrote:
> On Tue, Nov 26, 2013 at 8:42 PM, Ricardo Pedroso <[email protected]>wrote:
>>
>>> How may cores do you have?
>>> Are all the cores being used when you run the tests?
>>> What webserver are you testing against?
>>>
>>>
>> I have 4 cores, 16 GB RAM running Apache. But I think, this is
>> irrelevant. Apache easily serves 1000 static file requests (which are not
>> processed through web2y) with 100 concurrent connections on the same
>> machine, with the largest response time being <133 ms.
>>
>>
> Every thing is relevant.
>
> Assuming that you are using an OS with sendfile support:
>
> Webservers are optimized to serve static content, you cannot expect to go
> near that with dynamic content.
>
> When doing static files serving, and in your case always the same file,
> the kernel will cache it and there is no disk access,
> also to serve the file you will not have the typical system calls in the
> user space (open/read/write) you will have only one system call "sendfile"
> that works in the kernel space.
>
>
> from https://httpd.apache.org/docs/2.2/misc/perf-tuning.html:
>
> If your OS supports a sendfile(2) system call, make sure you install the
> release and/or patches needed to enable it. (With Linux, for example, this
> means using Linux 2.4 or later. For early releases of Solaris 8, you may
> need to apply a patch.) On systems where it is available, sendfileenables
> Apache 2 to deliver static content faster and with lower CPU
> utilization.
>
> What I can suggest right know, and assuming that you have the database and
> webserver in the same machine,
> is to put the database in another machine.
>
> If you are doing the ab tests in the same machine, do it in another one.
>
>
> Ricardo
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/rH1C7iXMPNA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.