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"; }
In reply to Re^2: Perl threads to open 200 http connections
by robrt
in thread Perl threads to open 200 http connections
by robrt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |