Measure Server Performance

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

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?

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?

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%.

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

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

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.

chan_pjsip

Yes, they are apparently

Where can I configure it?

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.

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

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.

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.

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?

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.

All firewall in this network is off

Now in the pjsip file is direct_media=no

[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

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.

1 Like

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

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.

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

Yes because I will eventually reach a limit.

Does “SIPP” support TLS, ZRTP, SRTP?

I have to talk to my supervisor what he think.