Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

- Concurrent connections limit - ulimit

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


navid at navid

Aug 21, 2011, 10:27 PM

Post #1 of 4 (547 views)
Permalink
- Concurrent connections limit - ulimit

Hi everyone,


I have a little problem that no matter what I do, I can't increase the
concurrent web requests and connections to my Cherokee.


As you will see below, no matter what I do, the maximum number of file
descriptor for user www-data remains at 1024 and poor Cherokee will not
be able to service more than 1024 concurrent connections ... could you
let me what I am missing here?


I have also modified Cherokee to report concurrent connections and the
logs will confirm above as well:

LOG::: CPU42% LdAvg 0.240000 AvgRspT 20 TtlConns 911 TtlHitThrshld 10
MinRspT 3 MxRspT 317 Duration 1009 Thrshld: 200


Above log tells us that the load average of system is 0.24 (during last
60 seconds). And CPU utilization is around 42%. And Average response
time is 20 ms and we have had 911 connections/requests within the last
1009ms. Acceptable response time threshold is 200ms and 10 connections
exceeded that limit while the minimum response time was 3 ms and maximum
response time was 317ms.



Here is what I have done:

cat /etc/security/limits.conf:
* soft nofile 65535
* hard nofile 65535

sysctl -w fs.file-max=300000
ulimit -n 100000
cat /proc/sys/fs/file-max will give us 300000


added new limits at the top of /etc/init.d/cherokee-webserver as limits
are inherited through fork():
ulimit -u 100000
ulimit -n 200000


===============================
ulimit -a for root:
===============================
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 100000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited




===============================
ulimit -a for www-data user:
===============================
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) 0
memory(kbytes) unlimited
locked memory(kbytes) 64
process unlimited
_/*nofiles 1024*/_
vmemory(kbytes) unlimited
locks unlimited



Thank you very much,

Navid


alvaro at octality

Aug 23, 2011, 10:37 AM

Post #2 of 4 (504 views)
Permalink
Re: - Concurrent connections limit - ulimit [In reply to]

Hello Navid,

On Mon, Aug 22, 2011 at 7:27 AM, Navid Mohaghegh <navid [at] navid> wrote:

> I have a little problem that no matter what I do, I can't increase the
> concurrent web requests and connections to my Cherokee.


Please, take a look at the System
Tuning<http://www.cherokee-project.com/doc/other_os_tuning.html>chapter
of the documentation.

--
Greetings, alo
http://www.octality.com/


navid at navid

Aug 26, 2011, 5:15 AM

Post #3 of 4 (504 views)
Permalink
Re: - Concurrent connections limit - ulimit [In reply to]

Hi Alvaro,


Thank you very much for your response.


I have done that with no luck:


sysctl -w fs.file-max=300000

which will do the same thing as echo 300000 to /proc/sys/fs/file-max:

also cat /proc/sys/fs/file-max will give me 300000 which means the
maximum open fd limit is changed.


The problem is the limit for user www-data which cherokee is running
under doesn't change:


cat /etc/security/limits.conf:
* soft nofile 65535
* hard nofile 65535

ulimit -n 100000




added new limits at the top of /etc/init.d/cherokee-webserver as limits
are inherited through fork():
ulimit -u 100000
ulimit -n 200000


===============================
ulimit -a for root:
===============================
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 100000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited




===============================
ulimit -a for www-data user:
===============================
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) 0
memory(kbytes) unlimited
locked memory(kbytes) 64
process unlimited
_/*nofiles 1024*/_
vmemory(kbytes) unlimited
locks unlimited



On 08/23/2011 01:37 PM, Alvaro Lopez Ortega wrote:

> Hello Navid,
>
> On Mon, Aug 22, 2011 at 7:27 AM, Navid Mohaghegh <navid [at] navid
> <mailto:navid [at] navid>> wrote:
>
> I have a little problem that no matter what I do, I can't increase
> the concurrent web requests and connections to my Cherokee.
>
>
> Please, take a look at the System Tuning
> <http://www.cherokee-project.com/doc/other_os_tuning.html> chapter of
> the documentation.
>
> --
> Greetings, alo
> http://www.octality.com/


chekolyn at gmail

Aug 26, 2011, 9:40 AM

Post #4 of 4 (554 views)
Permalink
Re: - Concurrent connections limit - ulimit [In reply to]

Hello Navid,

I had the same issue in Ubuntu. Basically you need to enforce those limits
in */etc/pam.d/su*

by uncommenting the following line:

*session required pam_limits.so *


Sergio

source: Raising nofile using ulimit on Ubuntu 10.04
<http://john.parnefjord.se/node/78>

On Fri, Aug 26, 2011 at 5:15 AM, Navid Mohaghegh <navid [at] navid> wrote:

> **
>
>
> Hi Alvaro,
>
>
> Thank you very much for your response.
>
>
> I have done that with no luck:
>
>
> sysctl -w fs.file-max=300000
>
> which will do the same thing as echo 300000 to /proc/sys/fs/file-max:
>
> also cat /proc/sys/fs/file-max will give me 300000 which means the maximum
> open fd limit is changed.
>
>
> The problem is the limit for user www-data which cherokee is running
> under doesn't change:
>
>
> cat /etc/security/limits.conf:
> * soft nofile 65535
> * hard nofile 65535
>
> ulimit -n 100000
>
>
>
>
> added new limits at the top of /etc/init.d/cherokee-webserver as limits are
> inherited through fork():
> ulimit -u 100000
> ulimit -n 200000
>
>
> ===============================
> ulimit -a for root:
> ===============================
> core file size (blocks, -c) 0
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 16382
> max locked memory (kbytes, -l) 64
> max memory size (kbytes, -m) unlimited
> open files (-n) 100000
> pipe size (512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority (-r) 0
> stack size (kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes (-u) unlimited
> virtual memory (kbytes, -v) unlimited
> file locks (-x) unlimited
>
>
>
>
> ===============================
> ulimit -a for www-data user:
> ===============================
> time(seconds) unlimited
> file(blocks) unlimited
> data(kbytes) unlimited
> stack(kbytes) 8192
> coredump(blocks) 0
> memory(kbytes) unlimited
> locked memory(kbytes) 64
> process unlimited
> *nofiles 1024*
> vmemory(kbytes) unlimited
> locks unlimited
>
>
>
> On 08/23/2011 01:37 PM, Alvaro Lopez Ortega wrote:
>
> Hello Navid,
>
> On Mon, Aug 22, 2011 at 7:27 AM, Navid Mohaghegh <navid [at] navid> wrote:
>
>> I have a little problem that no matter what I do, I can't increase the
>> concurrent web requests and connections to my Cherokee.
>
>
> Please, take a look at the System Tuning<http://www.cherokee-project.com/doc/other_os_tuning.html>chapter of the documentation.
>
> --
> Greetings, alo
> http://www.octality.com/
>
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.