mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #197] 关于配置与性能的问题 #131
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alwayswdc on GitHub (Dec 26, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/197
Frp我用owncloud同步遇到些性能问题,我之前采用ngrok的方案在办公室和家里的NAS进行资料同步,VPS是Vultr的日本服务器,速度可以达到800k/s,最近切换到了Frp,目前同步时下载速度大概只有200k/s。除此之外,所有的环境都没有变,当然不排除外部网络环境发生变化,例如ISP的出国线路在切换期间进行了调整,这个我没有测试,但是可能性很低。
除了owncloud之外,NAS上还转发了多个服务。例如监控和远程访问,我想请教的是,连接池是否会影响某个服务的下载速度,具体是怎样的?
@fatedier commented on GitHub (Dec 26, 2016):
相关配置能贴一下吗,是否启用了加密和压缩之类的。
@alwayswdc commented on GitHub (Dec 26, 2016):
稍等
@alwayswdc commented on GitHub (Dec 26, 2016):
Frps.ini:(centos7 64)
[common]
bind_port = 7000
vhost_http_port = 80
vhost_https_port = 443
dashboard_port = 7500
dashboard_user = ******
dashboard_pwd = ******
log_file = ./frps.log
log_level = info
log_max_days = 3
privilege_mode = true
privilege_token = ******
max_pool_count = 100
frpc.ini(win7 64)
[common]
server_addr = ********
server_port = 7000
log_file = D:/frpc.log
log_level = info
log_max_days = 3
privilege_token = ********
[blog]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = blog.******.com
use_gzip = true
pool_count = 5
[blogssl]
privilege_mode = true
type = https
local_ip = 127.0.0.1
local_port = 443
custom_domains = blog.******.com
use_gzip = true
pool_count = 5
[wiki]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = wiki.******.com
use_gzip = true
pool_count = 5
[wikissl]
privilege_mode = true
type = https
local_ip = 127.0.0.1
local_port = 443
custom_domains = wiki.******.com
use_gzip = true
pool_count = 5
[jupyter]
privilege_mode = true
type = http
local_ip = 127.0.0.1
custom_domains = jupyter.******.com
local_port = 8888
use_gzip = true
pool_count = 5
[jupyterssl]
#privilege_mode特权模式
privilege_mode = true
type = https
local_ip = 127.0.0.1
custom_domains = jupyter.******.com
local_port = 8889
use_encryption = true
use_gzip = true
pool_count = 5
[www]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = www.******.com
use_gzip = true
pool_count = 5
[cloud]
privilege_mode = true
type = http
local_ip = 192.168.1.180
local_port = 80
custom_domains = cloud.******.com
use_gzip = true
pool_count = 10
[cloudssl]
privilege_mode = true
type = https
local_ip = 192.168.1.180
local_port = 443
custom_domains = cloud.******.com
use_gzip = true
pool_count = 10
[radmin]
privilege_mode = true
type = tcp
remote_port = 4899
local_ip = 127.0.0.1
local_port = 4899
use_gzip = true
pool_count = 2
[jiankong]
privilege_mode = true
type = tcp
remote_port = 1234
local_ip = 127.0.0.1
local_port = 1234
use_gzip = true
pool_count = 2
@fatedier commented on GitHub (Dec 26, 2016):
连接池就是预先创建好一些连接,不会进行数据转发操作,理论上对其他服务的下载操作是没有影响的。
可以把 use_gzip 和 use_encryption 都关掉看是否会有一些提升?
后续我会关注优化下这方面的问题。
@alwayswdc commented on GitHub (Dec 26, 2016):
好的,我试一下
@alwayswdc commented on GitHub (Dec 26, 2016):
您好,关掉 use_gzip和use_encryption目前来看并没有明显的速度提升。不过我发现一个问题,如果用多个浏览器建立多个连接下载文件,速度总和是增加的。我再详细测试下,给你结果
@chmis8000 commented on GitHub (Dec 28, 2016):
难道服务器做了每连接的最大速度限制?
@fatedier commented on GitHub (Dec 28, 2016):
@chmis8000 没有做限制,ngrok 直接用的标准库的
io.Copy,frp 中由于支持加密和压缩,所以这个函数重新实现了,基本原理就是从一个 socket 读,写入另一个 socket,理论上速度应该是相差不大的。@yydcool commented on GitHub (Feb 16, 2017):
@wdc63应该是网络问题吧?请多做一些同一时段的ngrok对比测试看看
在这种慢网速情况下加密压缩不太可能是瓶颈