Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed an asterisk server on my VPS with linode. I have 1 GB of ram. I'm not sure what kind of CPU is in use.

I decided to test the number of concurrent calls my system can handle. So I used a script call "sipp" to help me with this. When creating the test calls, it seems my asterisk server can only take up to about 250 or so calls, then drops the remaining. I see messages like WARNING[8314]: rtp.c:2433 rtp_socket: Unable to allocate RTP socket: Too many open files in my asterisk terminal.

So I decided to run top to see how hard my server is working. Below is a screenshot of what I see:

enter image description here

I've tried reading tutorials on how to understand this, but I still don't fully understand. My understanding is that the 97.0%id means I have 97% of the CPU available? And the first line in the table shows asterisk using 64% of the cpu. But the 64% and 97% adds up to more than 100%, which isn't what I was expecting. Why is this so?

And my final question is, just by looking at this table, can one say if it's the CPU or memory that is limiting my number of concurrent calls to about 250 calls?

share|improve this question
    
In that photo, asterisk is using 64% of the CPU, so according to what I can see in that photo (assuming it's sorted by CPU), there is 36% of free cpu. –  demure May 18 '13 at 1:41
    
How many virtual CPUs do you have? –  Michael Hampton May 18 '13 at 3:55
    
I think i might have 2 virtual CPUs? i'm not sure –  John May 18 '13 at 10:49
add comment

1 Answer

up vote 1 down vote accepted

No, the CPU and memory usage aren't limiting you; the permissible number of open files for the asterisk user is. This can be adjusted by setting ulimit/sysctl settings. The HOW will depend on your Linux distribution.

share|improve this answer
    
ulimit says unlimited. I updated my fs.file-max from 102772 to 99999999, but still no effect. The calls still drop somewhere between 245 and 255. –  John May 18 '13 at 11:39
    
Ok, your answer got me most of the way there. I ended up editing the /etc/init.d/asterisk file and I added ulimit -n 2048 at the top of hte script. –  John May 18 '13 at 14:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.