VPN Client high CPU usage on Raspberry Pi

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
ceremcem
Posts: 11
Joined: Sat Feb 23, 2019 5:18 pm

VPN Client high CPU usage on Raspberry Pi

Post by ceremcem » Sun Jun 02, 2019 9:53 am

As attached, VPN client's CPU usage is way too high. What might be the reason?

VPN Client: https://github.com/SoftEtherVPN/SoftEth ... bit.tar.gz
You do not have the required permissions to view the files attached to this post.

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

Re: VPN Client high CPU usage on Raspberry Pi

Post by thisjun » Tue Jun 11, 2019 8:06 am

There are many factors.
Could you explain more about your VPN configuration, network environment, hardware information?

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

Re: VPN Client high CPU usage on Raspberry Pi

Post by thisjun » Tue Jun 11, 2019 8:06 am

There are many factors.
Could you explain more about your VPN configuration, network environment, hardware information?

ceremcem
Posts: 11
Joined: Sat Feb 23, 2019 5:18 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by ceremcem » Wed Jun 12, 2019 1:47 pm

Here is the CPU info:

Code: Select all

$ cat /proc/device-tree/model 
Raspberry Pi Model B Plus Rev 1.2

Code: Select all

$ cat /proc/cpuinfo 
processor	: 0
model name	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 697.95
Features	: half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2835
Revision	: 0010
Serial		: 000000002ab5986d
I'm not sure what I should supply as my "network environment info".

Here is my VPN configuration:

Code: Select all

VPN Connection Setting Name                          |heyyou
Destination VPN Server Host Name                     |...
Destination VPN Server Port Number                   |...
Destination VPN Server Virtual Hub Name              |foo
Proxy Server Type                                    |Direct TCP/IP Connection
Verify Server Certificate                            |Disable
Device Name Used for Connection                      |bbb
Authentication Type                                  |RADIUS or NT Domain Authentication
User Name                                            |...
Number of TCP Connections to Use in VPN Communication|1
Interval between Establishing Each TCP Connection    |1
Connection Life of Each TCP Connection               |Infinite
Use Half Duplex Mode                                 |Disable
Encryption by SSL                                    |Enable
Data Compression                                     |Disable
Connect by Bridge / Router Mode                      |Disable
Connect by Monitoring Mode                           |Disable
No Adjustment for Routing Table                      |Disable
Do not Use QoS Control Function                      |Disable
Note that disabling encryption with "AccountEncryptDisable" makes no difference.
Last edited by ceremcem on Wed Jun 12, 2019 7:06 pm, edited 2 times in total.

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

Re: VPN Client high CPU usage on Raspberry Pi

Post by thisjun » Mon Jun 24, 2019 5:19 am

Do you use SecureNAT or localbridge?
How much VPN communication does that server have?

Retinaquester2
Posts: 14
Joined: Sun Jun 03, 2018 11:53 am

Re: VPN Client high CPU usage on Raspberry Pi

Post by Retinaquester2 » Sat Jul 06, 2019 9:56 am

To simply put it. The Raspberry Pi is just short on resources.
(Running a VPN with encryption isn't a light load at all)

I too have tested with the Raspberry Pi (generation one)
(700 Mhz Single Arm Core)

- In bridge mode I could get about 1.44 MB/s sustainded transfer speed.
- That is after overclocking it to 1 Ghz.
- A second problem you will run into is the i.o
since the Raspberry uses a single chip for USB and Ethernet,
The 100 mbit ethernet connection will do about 40mbit max, and that's in ideal situation.
(Single file download on low latency network.)

Since 3 weeks I have a Raspberry Pi 3+ (I know they launched a new one days after I bought it... sight)
and this easily does 50 mbit. It's 4 cores are efficiently used.

Regards

ceremcem
Posts: 11
Joined: Sat Feb 23, 2019 5:18 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by ceremcem » Sun Jul 21, 2019 7:40 am

thisjun wrote:
Mon Jun 24, 2019 5:19 am
Do you use SecureNAT or localbridge?
How much VPN communication does that server have?
I'm using SecureNAT. My server has 2 clients and having no trouble handling the traffic, as far as I could see. The client (RaspberryPi) has no (or very little) communication while experiencing this much CPU usage.
Retinaquester2 wrote:
Sat Jul 06, 2019 9:56 am
To simply put it. The Raspberry Pi is just short on resources.
(Running a VPN with encryption isn't a light load at all)
It might have low resources. However I can use SSH and reverse SSH (which uses high-end encryption techniques) without such high CPU usages noticed.

lwk523
Posts: 11
Joined: Sat Jul 28, 2018 2:53 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by lwk523 » Sun Aug 11, 2019 4:57 am

ceremcem wrote:
Sun Jun 02, 2019 9:53 am
As attached, VPN client's CPU usage is way too high. What might be the reason?

VPN Client: https://github.com/SoftEtherVPN/SoftEth ... bit.tar.gz
Hi, Are you manage to resolve it ? I planned to get Raspberry Pi as sothether client and can you get a max speed with Raspberry Pi as a client ?

Thank you

ceremcem
Posts: 11
Joined: Sat Feb 23, 2019 5:18 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by ceremcem » Fri Aug 30, 2019 7:11 pm

lwk523 wrote:
Sun Aug 11, 2019 4:57 am
Hi, Are you manage to resolve it ?
Unfortunately no.
I planned to get Raspberry Pi as sothether client and can you get a max speed with Raspberry Pi as a client ?
The main problem is that Raspberry Pi becomes useless because SoftEther uses too much CPU.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by sky59 » Sat Aug 31, 2019 5:33 am

I think i have the same rpi. I also use vpnclient i do not see any problem.
But i compiled it from genuine source code, not from the *.a files you give link above.
Just unpack it and have a look what it really is.

If you want i can send you next week my comliped files + hamcode file.

ceremcem
Posts: 11
Joined: Sat Feb 23, 2019 5:18 pm

Re: VPN Client high CPU usage on Raspberry Pi

Post by ceremcem » Tue Sep 03, 2019 7:11 am

Okay, first of all I really don't know what I changed, but currently vpnclient uses very low resources. I'll share actual results when I perform a full load test.

History

1. I tried to compile the latest SoftEther client from git on RaspberryPi.
2. I couldn't compile because cmake>3.7 was required. I tried to compile latest cmake, however things didn't go smooth. RPi's RAM wasn't sufficient.
3. I set up a Qemu environment in order to overcome the RAM constraints and compile SoftEther for armf: https://github.com/ceremcem/rpi-qemu-emulation
4. I compiled SoftEther on this emulated environment: https://aktos.io/cloud/index.php/s/CYQpsBjwkHcaQNF
5. I couldn't try this newly created SoftEther client binaries on Qemu environment because something went wrong while creating virtual network device (I think it's because of the modified kernel)
6. I switched back to the physical (real) RaspberyPi
7. I tried to connect to my VPN server with the existing vpnclient and expected to see the extensive CPU usage.
8. I failed to see the extensive usage. Everything was normal.

Post Reply