# Measure Server Performance

**URL:** <https://community.asterisk.org/t/measure-server-performance/84686>\
**Category:** Asterisk Support\
**Created:** [June 23, 2020, 1:20pm UTC](https://community.asterisk.org/t/measure-server-performance/84686 "2020-06-23T13:20:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 23, 2020, 1:20pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/1 "2020-06-23T13:20:52Z")

</div>

Hello everyone

I have two questions for you.

1.) I would like to measure the performance of an RaspberryPI where Asterisk is running.  
Are there any recommendations? (no htop)

2.) I have 2 laptops with softphone. Registration and call work, but when I look into the Wireshark Trace I didn’t see that the RTP Packets running over the Asterisk server. Tried with direct\_media = no

thanks

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [June 23, 2020, 3:15pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/2 "2020-06-23T15:15:24Z")

</div>

> 1.) I would like to measure the performance of an RaspberryPI where Asterisk is running.  
> Are there any recommendations? (no htop)

What ‘KPI’ are you interested in measuring? CPU? Network? Disk?

Why no htop?

> 2.) I have 2 laptops with softphone. Registration and call work, but  
> when I look into the Wireshark Trace I didn’t see that the RTP Packets  
> running over the Asterisk server. Tried with direct\_media = no

What do the SDP tell you?

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 24, 2020, 6:17pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/3 "2020-06-24T18:17:37Z")

</div>

KPI: CPU, RAM, Network Traffic.  
I do not know exactly. Maybe I can work with Htop after all, I its confusing.  
Maybe I have to take a closer look at it.

Unfortunately I did not save the pcap file. Will try again tomorrow.

How many conversations should show first changes in performance?

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [June 24, 2020, 9:13pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/4 "2020-06-24T21:13:47Z")

</div>

On a Raspberry Pi 3b, 10 calls playing demo-congrats, transcoding from GSM to ULAW consumes 20% of the CPU. Eliminating transcoding drops the CPU to 10%.

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [June 24, 2020, 9:17pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/5 "2020-06-24T21:17:50Z")

</div>

`'top'` may be less confusing. `'iftop'` will show network traffic.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 9:06am UTC](https://community.asterisk.org/t/measure-server-performance/84686/6 "2020-06-26T09:06:45Z")

</div>

I have a port problem. Apparently only those with port 5060 run over my server.

I have several PhonerLite sessions open on 2 laptops and they call each other.

Can or where can you set that several ports should run on the server?  
I also need ports for TLS.

192.168.0.3 is my Asterisk Server

 ![image](https://global.discourse-cdn.com/asterisk/original/2X/3/3923337c3e5a34860745df08cb9275fdc824cb53.png)

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 26, 2020, 9:22am UTC](https://community.asterisk.org/t/measure-server-performance/84686/7 "2020-06-26T09:22:02Z")

</div>

Please explain why you think you need several ports, as I suspect there may be a fundamental misunderstanding here. In particular, all port numbers used will have to be explicitly configured, and these look like pretty random ones.

Which SIP channel technology driver are you using. The only way of doing this on chan\_sip is to run multiple instances of the Asterisk daemon, bound to different port numbers. I’m not sure whether or not chan\_pjsip allows one instance of the daemon to be bound to multiple port numbers.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 9:42am UTC](https://community.asterisk.org/t/measure-server-performance/84686/8 "2020-06-26T09:42:33Z")

</div>

> [@david551](#):
>
> Which SIP channel technology driver are you using.

chan\_pjsip

> [@david551](#):
>
> these look like pretty random ones.

Yes, they are apparently

> [@david551](#):
>
> In particular, all port numbers used will have to be explicitly configured

Where can I configure it?

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 26, 2020, 9:48am UTC](https://community.asterisk.org/t/measure-server-performance/84686/9 "2020-06-26T09:48:45Z")

</div>

pjsip.conf (transport), but I can’t rule out that you will have to run multiple instances, one per port number.

However, I think you are attacking this wrongly. You need to understand why weird port numbers are being used, and fix that.

You said the numbers are random and you can never configure to anticipate randomly chose numbers.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 10:17am UTC](https://community.asterisk.org/t/measure-server-performance/84686/10 "2020-06-26T10:17:50Z")

</div>

I believe it is because the ports of the softphones used were all the same 5060 and these softphones take any random port. This was then not in the range of RTP ports.

I have now changed the ports on the softphones.

But I still have to work through the trace, looks very strange

 ![image](https://global.discourse-cdn.com/asterisk/original/2X/6/6f0ef0f98008701c6992a3db4a36c340eb0273c7.png)

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [June 26, 2020, 10:23am UTC](https://community.asterisk.org/t/measure-server-performance/84686/11 "2020-06-26T10:23:56Z")

</div>

The ports that Asterisk uses and the ports that softphones use are completely separate. They don’t have to use the same port that is configured in Asterisk, and they don’t have to use the same RTP port range configured in Asterisk. From a signaling perspective SIP traffic is flowing back and forth fine.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 26, 2020, 11:09am UTC](https://community.asterisk.org/t/measure-server-performance/84686/12 "2020-06-26T11:09:18Z")

</div>

I should have looked more closely at the traces, and not taken the OP’s complaint at face value. I agree that the logging is showing normal operation and no action is needed.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 11:58am UTC](https://community.asterisk.org/t/measure-server-performance/84686/13 "2020-06-26T11:58:16Z")

</div>

The RTP streams still do not flow through the server. I made 9 calls, the server always shows the same values ​​on CPU 1.3% - 2% and RAM 144M load.

Default is no direct media or am I wrong?

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [June 26, 2020, 12:00pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/14 "2020-06-26T12:00:25Z")

</div>

The default is direct media enabled, but earlier you said you tried with disabled. You’d need to confirm what the current setting is.

You also need to provide the actual SIP trace (pjsip set logger on) which can be used to confirm addressing. As well information on whether any firewall is in place is also needed.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 12:19pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/15 "2020-06-26T12:19:48Z")

</div>

> [@jcolp](#):
>
> As well information on whether any firewall is in place is also needed.

All firewall in this network is off

> [@jcolp](#):
>
> You’d need to confirm what the current setting is.

Now in the pjsip file is direct\_media=no

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 12:22pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/16 "2020-06-26T12:22:44Z")

</div>

[global]  
max\_forwards=70  
user\_agent=Raspberry Pi BPX  
default\_realm=raspberrypi.local  
keep\_alive\_interval=300

; == Transports  
[udp-transport]

type=transport  
protocol=udp  
bind=0.0.0.0:5060

[400]  
type=endpoint  
transport=udp-transport  
context=from-my-phones  
direct\_media=no  
disallow=all  
allow=alaw  
allow=ulaw  
auth=400  
aors=400  
[400]  
type=auth  
auth\_type=userpass  
password=1234  
username=400  
[400]  
type=aor  
max\_contacts=10

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [June 26, 2020, 12:32pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/17 "2020-06-26T12:32:22Z")

</div>

Okay, so next up verify the IP addresses in the SIP signaling is correct. If they are then you’ll need to dig further - the Wireshark you’ve presented seems to show no constant flow of RTP to Asterisk itself, which would mean something on the softphone side. Break down the problem and verify assumptions.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 1:12pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/18 "2020-06-26T13:12:50Z")

</div>

The Softphone “PhonerLite” causes the problems, with “Blink” it works. I created 5 conversations, 4 being “on hold” and one taking place normally. (I still have to explain whether a hold call can count in my experiment)

To measure the CPUs, I still have to find out how I can / should measure this. In the 5 conversations, the individual CPUs oscillate between 11% and 20%.

@jcolp thanks

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [June 26, 2020, 5:00pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/19 "2020-06-26T17:00:11Z")

</div>

What is the actual goal here? Are you trying to find out how many simultaneous calls a Raspberry can handle?

Maybe using a tool like `'sipp'` would be a more appropriate path.

---

<div class="post-metadata">

**Author:** ![chazz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@chazz](https://community.asterisk.org/u/chazz)\
**Post date:** [June 26, 2020, 6:32pm UTC](https://community.asterisk.org/t/measure-server-performance/84686/20 "2020-06-26T18:32:33Z")

</div>

First and foremost, I want to show whether there are performance differences between RTP / SRTP / UDP / TLS.  
If yes, how do the differences evolve with 1,5,10,20 simultaneous conversations

> [@sedwards](#):
>
> how many simultaneous calls a Raspberry can handle?

Yes because I will eventually reach a limit.

Does “SIPP” support TLS, ZRTP, SRTP?

I have to talk to my supervisor what he think.

[Next page](https://community.asterisk.org/t/measure-server-performance/84686.md?page=2)
