I have 2 physical processor UltraSPARC-T2 with 32 virtual processors
I want to execute a perl program on 10 virtual processors.
I try prset command, but I don't see a difference.
When I use mpstat command, I wish to see 4 or 5 CPU virtual core used.
But only one virtual core is using.
Maybe my script don't need more CPU and I need to modify my script with threads module for example.
Because my script read one line in a source file and put it in an output file.
I can put into memory 10000 lines with a thread, and put in an output file 10000 lines
Code:
#!/usr/local/perl/bin/perl
use warnings;
use strict;
use threads;
sub ProcessLog{
my $l__line = "";
my $i = 0;
my $core=0;
while ( defined($l__line = <INPUT_FILE>)){
chomp($l__line);
$i++;
$core=0;
if($i==10000){
$i=1;
}
if($i==1){
$core++;
my $thr = threads->new(\&sub1,$l__line);
if($core==32){
$thr->join;
}
sub sub1 {
#print "In the thread\n";
my $line=$_[0];
#print "LINE:".$line;
if ($line ne ""){
my $val1="";
my $val2="";
my $val3="";
if(defined $line){
($val1,$val2,$val3)=split(/ /,$line);
}
my $l__newLine = $val1.";".$val3;
print OUTPUT_FILE $l__newLine."\n";
#return($l__newLine."\n");
}
}
}
}
}
my $l__logInput = $ARGV[0];
my $l__logOutput = $ARGV[1];
open(INPUT_FILE, "< $l__logInput") || die "probleme d'ouverture du fichier de lecture\n";
open(OUTPUT_FILE, "> $l__logOutput") || die "probleme d'ouverture du fichier d ecriture\n";
&ProcessLog;
Perl is probably not the best language to experiment with threads (and to experiment with anything IMHO).
Anyway, what perl version is /usr/local/perl/bin/perl ?
Code:
/usr/local/perl/bin/perl --version
Is threading support enabled ? As far as I know, it is still quite experimental.
hi all,
I am running SPARC server + solaris 10. (no LDOMs)
Due to change of setup and application licensing cost, I need to cap my core/cpu utilization in my globalzone.
Right now, I have 1x6 cores in my server, how do I change it to utilized 4 cores instead ?
By using... (2 Replies)
I would like to understand how many number of CPUs and cores do I have on my server based on following out put..
Few observations... Please correct me if I am wrong
Since Physical ID is same CPU is singe
It has 8 virtual processors
Hyper thrading is enabled since no of siblings are... (1 Reply)
Hi Friends-
What does it mean by 2 cpu cores, 3 cpu cores? Does it mean 2 separate cpus or what is it exactly ?
Kindly explain a bit in detail.
Thanks
panditt (4 Replies)
Hi all.
I've had a quick look around but cant see anything exactly matching my requirements.
I have a new T2000 running S10. Im looking to restrict the no. cores that a S10 non-global zone can use to 1 only. The box is single CPU but 8core.
I want to do this to save on some software... (4 Replies)
Hi,
what is concept of core in ibm platform?
I want to know how to find out no of core in cpu in aix i.e command
how to find out value of core?
Wheather any specification is there? (1 Reply)