aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-28 07:58:12 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-28 07:58:12 +0000
commit1c90bd35e34a9a237ebde4440367322a8cc2a686 (patch)
tree2dd230b6806d31350a51ca3897d1397142f9b06e
parenta7649a53a34e0d61f6e460be90a4ec5e10bdabc3 (diff)
downloadgnunet-1c90bd35e34a9a237ebde4440367322a8cc2a686.tar.gz
gnunet-1c90bd35e34a9a237ebde4440367322a8cc2a686.zip
docu
-rw-r--r--doc/man/gnunet-download.19
-rw-r--r--src/fs/gnunet-download.c10
2 files changed, 15 insertions, 4 deletions
diff --git a/doc/man/gnunet-download.1 b/doc/man/gnunet-download.1
index 8fcfaf2b5..b0ad09b73 100644
--- a/doc/man/gnunet-download.1
+++ b/doc/man/gnunet-download.1
@@ -1,4 +1,4 @@
1.TH GNUNET-DOWNLOAD "1" "6 Sep 2009" "GNUnet" 1.TH GNUNET-DOWNLOAD "1" "28 Apr 2010" "GNUnet"
2.SH NAME 2.SH NAME
3gnunet\-download \- a command line interface for downloading files from GNUnet 3gnunet\-download \- a command line interface for downloading files from GNUnet
4.SH SYNOPSIS 4.SH SYNOPSIS
@@ -31,7 +31,10 @@ ERROR, WARNING, INFO and DEBUG.
31write the file to FILENAME. Hint: when recursively downloading a directory, append a '/' to the end of the FILENAME to create a directory of that name. If no FILENAME is specified, gnunet\-download constructs a temporary ID from the URI of the file. The final filename is constructed based on meta\-data extracted using libextractor (if available). 31write the file to FILENAME. Hint: when recursively downloading a directory, append a '/' to the end of the FILENAME to create a directory of that name. If no FILENAME is specified, gnunet\-download constructs a temporary ID from the URI of the file. The final filename is constructed based on meta\-data extracted using libextractor (if available).
32.TP 32.TP
33\fB\-p \fIDOWNLOADS\fR, \fB\-\-parallelism=DOWNLOADS\fR 33\fB\-p \fIDOWNLOADS\fR, \fB\-\-parallelism=DOWNLOADS\fR
34set the maximum number of parallel downloads that is allowed. More parallel downloads can, to some extent, improve the overall time to download content. However, parallel downloads also take more memory. The specified number is the number of files that are downloaded in parallel, not the number of blocks that are concurrently requested. As a result, the number only matters for recursive downloads. The default value is 32. 34set the maximum number of parallel downloads that is allowed. More parallel downloads can, to some extent, improve the overall time to download content. However, parallel downloads also take more memory (see also option \-r which can be used to limit memory utilization) and more sockets. GNUnet typically only supports 1024 sockets per process, and each parallel download requires a new socket. Hence it is not possible to run more than about 1000 downloads in parallel. This option is used to limit the number of files that are downloaded in parallel (\-r can be used to limit the number of blocks that are concurrently requested). As a result, the value only matters for recursive downloads. The default value is 32. Note that the overall limit of 1000 downloads applies to gnunet\-service\-fs as well and using multiple gnunet\-download processes hence does not increase this limit.
35.TP
36\fB\-r \fIREQUESTS\fR, \fB\-\-request-parallelism=REQUESTS\fR
37set the maximum number of parallel requests that is allowed. If multiple files are downloaded, gnunet\-download will not run them in parallel if this would cause the number of pending requests to possibly exceed the given value. This is useful since, for example, downloading dozens of multi\-gigabyte files in parallel could exhaust memory resources and would hardly improve performance. Note that the limit only applies to this specific process and that other download activities by other processes are not included in this limit. Consider raising this limit for large recursive downloads with many large files if memory and network bandwidth are not fully utilized and if the parallelism limit (\-p option) is not reached. This option also only matters for recursive downloads. The default value is 4092.
35.TP 38.TP
36\fB\-R\fR, \fB\-\-recursive\fR 39\fB\-R\fR, \fB\-\-recursive\fR
37download directories recursively (and in parallel); note that the URI must belong to a GNUnet directory and that the filename given must end with a '/' \-\- otherwise, only the file corresponding to the URI will be downloaded. Note that in addition to using '-R', you must also specify a filename ending in '.gnd' so that the code realizes that the top-level file is a directory (since we have no meta data). 40download directories recursively (and in parallel); note that the URI must belong to a GNUnet directory and that the filename given must end with a '/' \-\- otherwise, only the file corresponding to the URI will be downloaded. Note that in addition to using '-R', you must also specify a filename ending in '.gnd' so that the code realizes that the top-level file is a directory (since we have no meta data).
@@ -62,4 +65,4 @@ GNUnet configuration file
62.SH "REPORTING BUGS" 65.SH "REPORTING BUGS"
63Report bugs to <https://gnunet.org/bugs/> or by sending electronic mail to <gnunet\-developers@gnu.org> 66Report bugs to <https://gnunet.org/bugs/> or by sending electronic mail to <gnunet\-developers@gnu.org>
64.SH "SEE ALSO" 67.SH "SEE ALSO"
65\fBgnunet\-gtk\fP(1), \fBgnunet\-publish\fP(1), \fBgnunet\-gtk\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5), \fBgnunetd\fP(1) 68\fBgnunet\-gtk\fP(1), \fBgnunet\-publish\fP(1), \fBgnunet\-gtk\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5), \fBgnunet\-service\-fs\fP(1)
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index bbc750026..bc98d0275 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -46,6 +46,8 @@ static unsigned int anonymity = 1;
46 46
47static unsigned int parallelism = 16; 47static unsigned int parallelism = 16;
48 48
49static unsigned int request_parallelism = 4092;
50
49static int do_recursive; 51static int do_recursive;
50 52
51static char *filename; 53static char *filename;
@@ -208,6 +210,8 @@ run (void *cls,
208 GNUNET_FS_FLAGS_NONE, 210 GNUNET_FS_FLAGS_NONE,
209 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, 211 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM,
210 parallelism, 212 parallelism,
213 GNUNET_FS_OPTIONS_REQUEST_PARALLELISM,
214 request_parallelism,
211 GNUNET_FS_OPTIONS_END); 215 GNUNET_FS_OPTIONS_END);
212 if (NULL == ctx) 216 if (NULL == ctx)
213 { 217 {
@@ -260,8 +264,12 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
260 1, &GNUNET_GETOPT_set_string, &filename}, 264 1, &GNUNET_GETOPT_set_string, &filename},
261 {'p', "parallelism", "DOWNLOADS", 265 {'p', "parallelism", "DOWNLOADS",
262 gettext_noop 266 gettext_noop
263 ("set the maximum number of parallel downloads that are allowed"), 267 ("set the maximum number of parallel downloads that is allowed"),
264 1, &GNUNET_GETOPT_set_uint, &parallelism}, 268 1, &GNUNET_GETOPT_set_uint, &parallelism},
269 {'r', "request-parallelism", "REQUESTS",
270 gettext_noop
271 ("set the maximum number of parallel requests for blocks that is allowed"),
272 1, &GNUNET_GETOPT_set_uint, &request_parallelism},
265 {'R', "recursive", NULL, 273 {'R', "recursive", NULL,
266 gettext_noop ("download a GNUnet directory recursively"), 274 gettext_noop ("download a GNUnet directory recursively"),
267 0, &GNUNET_GETOPT_set_one, &do_recursive}, 275 0, &GNUNET_GETOPT_set_one, &do_recursive},