Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Speed is slow #5

Closed
devstar1988 opened this issue May 10, 2017 · 6 comments
Closed

Speed is slow #5

devstar1988 opened this issue May 10, 2017 · 6 comments

Comments

@devstar1988
Copy link

Hello

I tried to use this adapter for my personal purpose.
Btw, this adapter has limitation in network speed.

When i use openvpn client app, speed was up to 30mbps.
but, if i use this adapter, speed was up to 1mbps.

I think that there is some limitation in buffer size.
I tried to add following settings into vpn profile.

sndbuf 65536
rcvbuff 65536

but, when i connect to vpn, if i debug, sometimes i get this error.
Tun write error: write_some: No buffer space available

@devstar1988
Copy link
Author

When this project is available to use?

@ss-abramchuk
Copy link
Owner

Hi @devstar1988,

Right now the project uses TunBuilder for creating tunnel and on the last step it requires file descriptor (FD) of the TUN. iOS doesn't allow getting this descriptor so as workaround I use paired sockets. I send FD of one of them to the OpenVPN library and use another one for reading/writing data. This could very well be a bottleneck, sometimes buffer overflows and that's why you could see this message: Tun write error: write_some: No buffer space available

Few commits ago OpenVPN devs added possibility to create custom factory for tunnel creation and reading/writing. I'm going to implement it to get rid of sockets but alas I don't have ETA yet.

Later today I'll try to increase buffer size for sockets and slightly modify reading/writing process but I cant't guarantee the result.

@devstar1988
Copy link
Author

Ok, thanks

Just saw your latest commit.
Fixed this issue?

@devstar1988
Copy link
Author

Great works.

It worked. Now, speed were increased.

Thanks a lot

@ss-abramchuk
Copy link
Owner

Glad to hear it! Thanks for letting me know about this issue.

@devstar1988
Copy link
Author

I will check this bit more. if any issue, i will let you know.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants