Commit f22e6064 by ziho

v1

parent d4b207c9
...@@ -20,8 +20,8 @@ port=43215 #随意指定的端口号,没有冲突就不管 ...@@ -20,8 +20,8 @@ port=43215 #随意指定的端口号,没有冲突就不管
source='selfplay_data' #存放有.moves和.moves.finish的地方 source='selfplay_data' #存放有.moves和.moves.finish的地方
packsize=64 #打包时多少个文件一组,小批次的话文件到达得就均匀些,文件产生慢的话似乎也没必要 packsize=64 #打包时多少个文件一组,小批次的话文件到达得就均匀些,文件产生慢的话似乎也没必要
maxthread=40 #最大开启的线程数量 maxthread=5 #最大开启的线程数量
sleeptime=1 #每两个打包文件发送的最少间隔,因为同一时刻有多个线程大家会一起变慢 sleeptime=3 #每两个打包文件发送的最少间隔,因为同一时刻有多个线程大家会一起变慢
alpha=0.8 #尝试用滑动平均法来控制sleeptime,网络慢的时候就发慢些 alpha=0.8 #尝试用滑动平均法来控制sleeptime,网络慢的时候就发慢些
#alpha是上一时刻sleeptime的权重 #alpha是上一时刻sleeptime的权重
...@@ -66,13 +66,11 @@ python tcpsend.py ...@@ -66,13 +66,11 @@ python tcpsend.py
#### 问题 #### 问题
1、两个包发送间隔用什么参数来估计?现在的公式是 1、两个包发送间隔用什么参数来估计?现在的公式是
$$ $$
T_{sleep}=\alpha*T_{sleep}+(1-\alpha)T_{trans}*C T_{sleep}=\alpha*T_{sleep}+(1-\alpha)T_{trans}*C
$$ $$
​ T_trans是开始连接到传输完成的单次时延,C是一个常数,这个常数目前是1.375,低了会出现拥挤 ​ T_trans是开始连接到传输完成的单次时延,C是一个常数,这个常数目前是1.375,低了会出现拥挤
​ 网络波动大的时候情况还没测试 ​ 网络波动大的时候情况还没测试,因为只测试过127.0.0.1的情况
​ 也许排队论有一些确定方法 ​ 也许排队论有一些确定方法
\ No newline at end of file
...@@ -4,13 +4,13 @@ import socket ...@@ -4,13 +4,13 @@ import socket
import threading import threading
import time import time
ip='127.0.0.1' ip='218.104.194.130'
port=43215 port=43215
source='selfplay_data' 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 maxthread=5
sleeptime=1 #I will try to change it dynamically sleeptime=3 #I will try to change it dynamically
alpha=0.8 #maybe moving average? alpha=0.8 #maybe moving average?
#if there are many threads sending at the same time,they may be slow together #if there are many threads sending at the same time,they may be slow together
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment