in reply to Re: Perl threads to open 200 http connections
in thread Perl threads to open 200 http connections
Thanks! I changed the stack size to 4096, and now around 185 connections are getting established. I tried to lower the stack size to 1024 hoping to see the connections rise but it didn't happen.
I tried to implement LWP::Simple but I noticed that it copies only the website matter(visible content on site), not the actual 10MB files.
So, when I tried copy the files using the below code, this script is failing after 30 threads itself.My aim is to fill the network pipe almost to 400 MB, but opening around 180 files is filling only around 70MB. Can anyone suggest me better way to fill the network bandwidth please.use strict; use LWP::Simple; my $path = "http://10.2.1.23/http-path/payload/10MB/"; for (my $i=0;$i<200;$i++) { my $filename = "File-10M-".$i.".txt"; my $url = $path.$filename; my $file = "D:\\kshare\\payload\\$filename"; $thread = threads->new(\&httpcon, $url, $file); } $thread->join; sub httpcon { my $url = shift; my $file = shift; is_success(getstore($url, $file)) or die "$!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl threads to open 200 http connections
by BrowserUk (Patriarch) on Aug 03, 2010 at 11:27 UTC | |
by robrt (Novice) on Aug 04, 2010 at 13:07 UTC | |
by ikegami (Patriarch) on Aug 04, 2010 at 16:19 UTC | |
by BrowserUk (Patriarch) on Aug 04, 2010 at 16:28 UTC | |
by robrt (Novice) on Aug 05, 2010 at 14:41 UTC |