1 |
-========================================================================- |
2 |
- Project IDFetch - Weekly report #4 ("Growing muscles on skeleton") - |
3 |
-========================================================================- |
4 |
|
5 |
Fresh milk and cottage cheese gradually enforce the skeleton, at the |
6 |
same time growing muscles on it can take a lot of efforts. Nevertheless |
7 |
pulling-ups, mirror benchmarking [1], and other things were added to my |
8 |
program. |
9 |
|
10 |
NOTE: |
11 |
Previous weeks i kept writing reports, but while sending |
12 |
them i used my default email account, which |
13 |
unfortunately happened to be not the one subscribed to |
14 |
[gentoo-soc]. Hence, i don't think anybody got them. |
15 |
Yesterday i resent these reports (better later then |
16 |
never): |
17 |
- Project IDFetch - Weekly report #2 ("Replacing |
18 |
stuff") |
19 |
- Project IDFetch - Weekly report #3 ("Strawberry |
20 |
issues") |
21 |
|
22 |
Since i've already tried writing reports without sending |
23 |
them, why not to do the opposite - to send a report |
24 |
without actually writing it ;o) |
25 |
So please take a look at the list of the options |
26 |
implemented in segget during the 4th week of IDFetch |
27 |
project. |
28 |
|
29 |
IDFetch: adding muscles to segget.conf skeleton: |
30 |
================================================ |
31 |
|
32 |
[folders] |
33 |
# DISTFILES_DIR |
34 |
# Define a dir to store distfiles |
35 |
# Default: |
36 |
# distfiles_dir=./distfiles |
37 |
distfiles_dir=./distfiles |
38 |
|
39 |
# SEGMENTS_DIR |
40 |
# Define a dir to store distfiles' segments |
41 |
# Default: |
42 |
# segments_dir=./tmp |
43 |
segments_dir=./tmp |
44 |
|
45 |
[distfiles] |
46 |
# MAX_CONNECTION_NUM_PER_DISTFILE |
47 |
# Each distfile can have up to max_connection_num_per_distfile |
48 |
# simultaneous connections. |
49 |
# default: |
50 |
# max_connection_num_per_distfile=3 |
51 |
max_connection_num_per_distfile=3 |
52 |
|
53 |
[segments] |
54 |
# MAX_SEGMENT_SIZE |
55 |
# Define maximum segment size in bytes. |
56 |
# Default: |
57 |
# max_segment_size=500000 |
58 |
max_segment_size=500000 |
59 |
|
60 |
# SYNOPSIS: resume_on=0 | 1 |
61 |
# - If resume_on set to 1: |
62 |
# Before starting downloading a segment segget checks whether this |
63 |
# segment is already downloaded, checks segments size and if size |
64 |
# mathces considers this segment to be downloaded and skips downloading |
65 |
# process. |
66 |
# - If resume_on set to 0: |
67 |
# Segget always starts new fetch for a segment regardless of the |
68 |
# fact whether it is downloaded or not. |
69 |
# Default: |
70 |
# resume_on=1 |
71 |
resume_on=1 |
72 |
|
73 |
# MAX_TRIES |
74 |
# If segment download was unsuccessful, new attempts are made. When |
75 |
# attempts number reaches max_tries, segment gets FAILED status and |
76 |
# error logged to error_log. |
77 |
# Default: |
78 |
# max_tries=10 |
79 |
max_tries=10 |
80 |
|
81 |
[connections] |
82 |
# MAX_CONNECTIONS |
83 |
# Define maximum number of connections |
84 |
max_connections=10 |
85 |
|
86 |
# CONNECTION_TIMEOUT |
87 |
# Set the number of seconds to wait while trying to connect. Use 0 to |
88 |
# wait indefinitely. Pass a long. It should contain the maximum time in |
89 |
# seconds that you allow the connection to the server to take. This |
90 |
# only limits the connection phase, once it has connected, this option |
91 |
# is of no more use. Set to zero to disable connection timeout (it will |
92 |
# then only timeout on the system's internal timeouts). See also the |
93 |
# TIMEOUT option. |
94 |
# Default: |
95 |
# connection_timeout=15 |
96 |
connection_timeout=15 |
97 |
|
98 |
# FTP_RESPONSE_TIMEOUT |
99 |
# Set a timeout period (in seconds) on the amount of time that the |
100 |
# server is allowed to take in order to generate a response message for |
101 |
# a command before the session is considered hung. While awaiting for a |
102 |
# response, this value overrides TIMEOUT. It is recommended that if |
103 |
# used in conjunction with TIMEOUT, you set FTP_RESPONSE_TIMEOUT to a |
104 |
# value smaller than TIMEOUT. |
105 |
# Default: |
106 |
# ftp_response_timeout=180 |
107 |
ftp_response_timeout=180 |
108 |
|
109 |
# TIMEOUT |
110 |
# maximum amount of time to download segment in seconds |
111 |
# Set the maximum number of seconds for a connection to execute. |
112 |
# Pass a long as parameter containing the maximum time in seconds that |
113 |
# you allow the transfer operation to take. Normally, name lookups can |
114 |
# take a considerable |
115 |
# time and limiting operations to less than a few minutes risk aborting |
116 |
# perfectly normal operations. |
117 |
# Default: |
118 |
# timeout=500 |
119 |
timeout=500 |
120 |
|
121 |
# LOW_CONNECTION_SPEED_LIMIT |
122 |
# Define the low speed limit for connection. Pass a long as parameter. |
123 |
# It contains the transfer speed in bytes per second that the transfer |
124 |
# should be below during LOW_CONNECTION_SPEED_TIME seconds to consider |
125 |
# it too slow and abort. |
126 |
# Default: |
127 |
# low_connection_speed_limit=1000 |
128 |
low_connection_speed_limit=1000 |
129 |
|
130 |
# LOW_CONNECTION_SPEED_TIME |
131 |
# Pass a long as parameter. It contains the time in seconds that the |
132 |
# transfer should be below the LOW_CONNECTION_SPEED_LIMIT to consider |
133 |
# it too slow and abort. |
134 |
# Default: |
135 |
# low_connection_speed_time=10 |
136 |
low_connection_speed_time=10 |
137 |
|
138 |
# MAX_CONNECTION_SPEED |
139 |
# If a download exceeds this speed (counted in bytes per second) on |
140 |
# cumulative average during the transfer, the transfer will pause to |
141 |
# keep the average rate less than or equal to the parameter value. |
142 |
# Defaults to unlimited speed. |
143 |
# Default: |
144 |
# max_connection_speed=0 |
145 |
max_connection_speed=0 |
146 |
|
147 |
# BIND INTERFACE / IP |
148 |
# Pass a string as parameter. This sets the interface name to use as |
149 |
# outgoing network interface. The name can be an interface name, an IP |
150 |
# address, or a host name. No binding is set by default. |
151 |
# Default: |
152 |
# bind_interface=none |
153 |
bind_interface=none |
154 |
|
155 |
[mirrors] |
156 |
# MAX_CONNECTIONS_NUM_PER_MIRROR |
157 |
# Define how many simultaneous downloads from one mirror segget is |
158 |
# allowed to have. While choosing a mirror segget will skip mirrors |
159 |
# with max_connections_num_per_mirror active downloads. |
160 |
# Default: |
161 |
# max_connections_num_per_mirror=1 |
162 |
max_connections_num_per_mirror=1 |
163 |
|
164 |
# SYNOPSIS: collect_benchmark_stats_on=0 | 1 |
165 |
# - If set to 1, stats on mirrors performance will be collected. |
166 |
# default: |
167 |
# collect_benchmark_stats_on=1 |
168 |
# ***Note: at the moment collect_benchmark_stats_on can NOT be set to 0 |
169 |
collect_benchmark_stats_on=1 |
170 |
|
171 |
# SYNOPSIS: use_benchmark_stats=0 | 1 |
172 |
# If use_benchmark_stats=1 statistics on mirrors is used to rate them |
173 |
# and therefore improve performance. |
174 |
# Each time connection from a particular mirror closes mirror->dld_time, |
175 |
# and mirror->dld_size get increased (in case of unsuccessful connection |
176 |
# only time gets increased), so avg speed for a mirror can be |
177 |
# calculated: |
178 |
# |
179 |
# mirror->avg_speed=mirror->dld_size/mirror->dld_time. (1) |
180 |
# |
181 |
# When new segment is going to be started segget goes through the list of |
182 |
# the mirrors distfile/segment has, and asks each mirror for self_rating: |
183 |
# |
184 |
# "ulong self_rating=mirror->mirror_on_the_wall();". |
185 |
# |
186 |
# This way segget chooses a mirror with the best self_rating. To calculate |
187 |
# self_rating mirrors use the following formula: |
188 |
# |
189 |
# self_rating=dld_time/dld_size*honesty. (2) |
190 |
# |
191 |
# So mirrors actually say how bad they are. |
192 |
# Even mirrors can have critical times, so to give mirrors another chance |
193 |
# honesty was added to the formula (2). honesty can get values in |
194 |
# interval (0,1]. Each time connection from a mirror opens or closes mirror |
195 |
# sets its honesty=1. If mirror was asked for self_evaluation with |
196 |
# mirror->mirror_on_the_wall(), but wasn't chosen its honesty decreases |
197 |
# somewhat (see [mirror].benchmark_oblivion option), so next time it will |
198 |
# lie little bit more about how bad it's. |
199 |
# Default: |
200 |
# use_benchmark_results=1 |
201 |
# ***Note: at the moment use_benchmark_results can NOT be set to 0 |
202 |
use_benchmark_stats=1 |
203 |
|
204 |
# BENCHMARK_OBLIVION |
205 |
# benchmark_oblivion option allows to adjust how fast segget "forgets" |
206 |
# benchmarking statistics on mirrors performance. |
207 |
# Each time mirror->mirror_on_the_wall() called, mirror decreases its |
208 |
# honesty (to have more chances next time) using the following formula: |
209 |
# |
210 |
# honesty=honesty*100/(100+settings.benchmark_oblivion) (3) |
211 |
# |
212 |
# Therefore, setting benchmark_oblivion=100 will make mirror look twice |
213 |
# less bad next time mirror->mirror_on_the_wall() called. |
214 |
# Default: |
215 |
# benchmark_oblivion=5 |
216 |
benchmark_oblivion=5 |
217 |
|
218 |
[user-data] |
219 |
# USER_AGENT |
220 |
# Set the User-Agent: header in the http request sent to the remote |
221 |
# server. |
222 |
# This can be used to fool servers or scripts. |
223 |
# Default: |
224 |
# user_agent=segget |
225 |
user_agent=segget |
226 |
|
227 |
[proxy] |
228 |
# PROXY_IP_OR_NAME |
229 |
# Specify a proxy to use (address and port). |
230 |
# Set HTTP proxy to use. The parameter should be a string holding the |
231 |
# proxy host name or dotted IP address. To specify port number in this |
232 |
# string, append :[port] to the end of the host name. The proxy string |
233 |
# may be prefixed with [protocol]:// since any such prefix will be |
234 |
# ignored. The proxy's port number may optionally be specified with the |
235 |
# separate option. If not specified, by default port 1080 will be used |
236 |
# for proxies. When you tell segget to use an HTTP proxy, segget will |
237 |
# transparently convert operations to HTTP even if you specify an FTP |
238 |
# URL etc. Segget respects the environment variables http_proxy, |
239 |
# ftp_proxy, all_proxy etc, if any of those are set. The PROXY option |
240 |
# does however override any possibly set environment variables. |
241 |
# Default: |
242 |
# proxy_ip_or_name=none |
243 |
proxy_ip_or_name=none |
244 |
|
245 |
# PROXY_PORT |
246 |
# Set the proxy port to connect to unless it is specified in the PROXY |
247 |
# option. |
248 |
# Default: |
249 |
# proxy_port=3128 |
250 |
proxy_port=3128 |
251 |
|
252 |
# PROXY_USER |
253 |
# Set user name to use for the transfer while connecting to Proxy. |
254 |
# The PROXY_USER option should be used in same way as the |
255 |
# PROXY_PASSWORD is used. In order to specify the password to be used |
256 |
# in conjunction with the user name use the PROXY_PASSWORD option. |
257 |
# Default: |
258 |
# proxy_user=none |
259 |
proxy_user=none |
260 |
|
261 |
# PROXY_PASSWORD |
262 |
# Set password to use for the transfer while connecting to Proxy. |
263 |
# The PROXY_PASSWORD option should be used in conjunction with the |
264 |
# PROXY_USER option. |
265 |
# Default: |
266 |
# proxy_password=none |
267 |
proxy_password=none |
268 |
|
269 |
# SYNOPSIS: proxy_off=0 | 1 |
270 |
# Setting the proxy_off=1 will explicitly disable the use of a proxy, |
271 |
# even if there is an environment variable set for it. |
272 |
# Default: |
273 |
# proxy_off=1 |
274 |
proxy_off=1 |
275 |
|
276 |
[logs] |
277 |
# LOGS_DIR |
278 |
# Define a dir to store log files. |
279 |
# Default: |
280 |
# logs_dir=./logs |
281 |
logs_dir=./logs |
282 |
|
283 |
# GENERAL_LOG_FILE |
284 |
# Define a file name to store general log. |
285 |
# Default: |
286 |
# general_log_file=segget.log |
287 |
general_log_file=segget.log |
288 |
|
289 |
# ERROR_LOG_FILE |
290 |
# Define a file name to store error log. |
291 |
# Default: |
292 |
# error_log_file=segget.log |
293 |
error_log_file=error.log |
294 |
|
295 |
# DEBUG_LOG_FILE |
296 |
# Define a file name to store debug log. |
297 |
# Default: |
298 |
# debug_log_file=segget.log |
299 |
debug_log_file=debug.log |
300 |
|
301 |
[1]http://www.twolia.com/blogs/daily-beauty-break/files/2010/04/mirror-on-the-wall.jpg |
302 |
|
303 |
Best regards, |
304 |
Kostyantyn Ovechko AKA simka |