Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tcp-trans
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangzhihao
tcp-trans
Commits
f22e6064
Commit
f22e6064
authored
Jul 17, 2020
by
ziho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1
parent
d4b207c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
readme.md
+4
-5
tcpsend.py
+4
-4
No files found.
readme.md
View file @
f22e6064
...
...
@@ -20,8 +20,8 @@ port=43215 #随意指定的端口号,没有冲突就不管
source
=
'selfplay_data'
#存放有.moves和.moves.finish的地方
packsize
=
64
#打包时多少个文件一组,小批次的话文件到达得就均匀些,文件产生慢的话似乎也没必要
maxthread
=
40
#最大开启的线程数量
sleeptime
=
1
#每两个打包文件发送的最少间隔,因为同一时刻有多个线程大家会一起变慢
maxthread
=
5
#最大开启的线程数量
sleeptime
=
3
#每两个打包文件发送的最少间隔,因为同一时刻有多个线程大家会一起变慢
alpha
=
0.8
#尝试用滑动平均法来控制sleeptime,网络慢的时候就发慢些
#alpha是上一时刻sleeptime的权重
...
...
@@ -66,13 +66,11 @@ python tcpsend.py
#### 问题
1、两个包发送间隔用什么参数来估计?现在的公式是
$$
T_{sleep}=
\a
lpha
*T_{sleep}+(1-\alpha)T_{trans}*
C
$$
T_trans是开始连接到传输完成的单次时延,C是一个常数,这个常数目前是1.375,低了会出现拥挤
网络波动大的时候情况还没测试
网络波动大的时候情况还没测试
,因为只测试过127.0.0.1的情况
也许排队论有一些确定方法
\ No newline at end of file
tcpsend.py
View file @
f22e6064
...
...
@@ -4,13 +4,13 @@ import socket
import
threading
import
time
ip
=
'
127.0.0.1
'
ip
=
'
218.104.194.130
'
port
=
43215
source
=
'selfplay_data'
packsize
=
128
#the number of files that 1 '*.tar' file contain
packsize
=
64
#the number of files that 1 '*.tar' file contain
maxthread
=
40
sleeptime
=
1
#I will try to change it dynamically
maxthread
=
5
sleeptime
=
3
#I will try to change it dynamically
alpha
=
0.8
#maybe moving average?
#if there are many threads sending at the same time,they may be slow together
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment