Hello  everybody, 

                We benchmark serveur jabberd2 (2.0.11 and 2.1.8) on
linux debian etc and we found a limit with 1000 users.

                We use a script written in perl that send connection
with a user called user1 to user10000. 

                 

                I put at the end of this mail my program of test.

                 

                When we analyse the stats of the machine with vmstat,
the CPU ID goes to 0 and any new connection 

                are refused.

                 

                Our machine is 

                model name       :  AMD Opteron(tm) Processor 252
                stepping            :  1
                cpu MHz           :  2605.906
                cache size        :  1024 KB

                MemTotal:           1048724 kB

                 

                I compare with these results with the others

        
http://mail.jabber.org/pipermail/jabberd/2004-August/001879.html

                 

                What do you think about  this results ?

                 

                Here is our results of connections:

                Thu Sep 13 09:30:01 CEST 2007
                free     us  sy id
                39068     0  0 100
                38388     1  0 99
                38388     0  0 100
                38388     0  0 100
                38388     0  0 100
                38388     0  0 100
                38388     0  0 100
                38388     0  0 100
                38404     0  0 100
                38404     0  0 100
                connect 3
                nb ports 5222 3
                disconnect 1

                
                Thu Sep 13 10:56:01 CEST 2007
                free     us  sy id
                11640     0  0 100
                10552     0  1 99
                10552     0  0 100
                10552     0  0 100
                10552     0  0 100
                10552     0  0 100
                10552     0  0 100
                10552     0  0 100
                10568     0  0 100
                10568     0  0 100
                connect 1004
                nb ports 5222 1001
                disconnect 6

                 

                Thu Sep 13 10:57:01 CEST 2007
                free     us  sy id
                11320     0  0 100
                10404     3  97 0
                10404     4  96 0
                10404     1  99 0
                10420     3  97 0
                10420     3  97 0
                10420     0  100 0
                10420     3  97 0
                10420     3  97 0
                10420     4  96 0
                connect 1021
                nb ports 5222 1026
                disconnect 6

                 

                When we have more than 1021 users, the CPU works to 100%
and any new connections are refused.

                Are these results  true  ? 

                Does it depend from the system configuration or the
version of jabber ?

                Have you same results with same configuration ?

                Do you have other resultats of benchmarking a jabber's
server ?

                 

                Thank you for you  answers 

                Emmanuel Giraud 

                 

        
------------------------------------------------------------------------
-------------------------------

        
------------------------------------------------------------------------
-------------------------------

                I run this program perl in a shell:

                My arguments are the users.

                #!/bin/bash
                ./bench4.pl 1 500 &
                ./bench4.pl 501 1000 &
                sleep 50 

        
------------------------------------------------------------------------
-------------------------------

        
------------------------------------------------------------------------
-------------------------------

                 

                Here is our script perl:

                bench4.pl: 

                 use Benchmark; 

                
                use Time::HiRes qw(sleep);
                use strict; 
                use Net::Jabber qw(Client);
                use Getopt::Std; 

                 

                # Setup signal handlers.

                 

                $SIG{INT}  = sub { $main::done = 1; };
                $SIG{TERM} = sub { $main::done = 1; };

                 

                # Get the command line options.
                my ($opt_w, $opt_h, $opt_l);
                my $opt_ok = getopts('hl:w:');

                 

                # Print the usage if -h or if there was an error
                die &$USAGE if ((!$opt_ok || $opt_h) || @ARGV != 2);

                 

                my $users = shift;
                die "Number of users must be a positive integer between
1 and 10000.\n"
                    unless ($users >= 1 && $users <= 10000);
                    
                my $end_user = shift;
                die "Starting user must be a positive integer between 1
and 20000.\n"
                    unless ($end_user >= 1 && $end_user <= 20000);
                    
                our $done =0;
                my $server      = "jabber.dsit.sncf.fr";
                my $domain      = "jabber.dsit.sncf.fr";
                my $unames      = "test";
                my $padchars    = $opt_l;
                my $throttle    = $opt_w;
                my $port        = "5222";
                my $ssl         = 0;
                my $resource    = "perl-jabber";
                my $debuglevel  = 0;
                my $con_type="tcpip";

                 

                sender( $server, $port, $resource, $domain, $padchars,
$throttle, $ssl, $con_type, $debuglevel, $users, $end_user );

                 

                sub sender {
                    my $server      = shift;
                    my $port        = shift;
                    my $resource    = shift;
                    my $domain      = shift;
                    my $padchars    = shift;
                    my $throttle    = shift;
                    my $ssl         = shift;
                    my $con_type    = shift;
                    my $debug       = shift;
                    my $users       = shift;
                    my $end_user  = shift;

                 

                    my $padding;
                    foreach( 1..$padchars ) {
                        $padding .= ".";
                    }

                 

                    my @con;

                 

                    my $i = $users;
                    while( $i < ($end_user ) ) {
                        my $user = "user" . $i;
                        my $pass = "pass" . $i;
                        my $con = jabber_connect( $server, $port, $user,
$pass, $resource, $debug, $ssl, $con_type );
                        $con->RosterGet();
                        $con->PresenceSend();

                 

                        my $recipient = "user" . ($i + 1);
                        $con->{recipient} = $recipient . "\@" . $domain;
                        $i = $i + 1;
                        push(@con, $con);
                        print "user:$user";
                        sleep 3;
                    }

                 

                    my $delay = $throttle / @con;

                 

                    sleep(10000);
                    foreach( @con ) {
                        $_->Disconnect();
                    }
                }

                 

                sub jabber_connect {
                    my $con_server     = shift;
                    my $con_port       = shift;
                    my $con_user       = shift; 
                    my $con_password   = shift;
                    my $con_resource   = shift;
                    my $debug          = shift;
                    my $ssl            = shift;
                    my $con_type       = shift;

                 

                    my $ReCon = new
Net::Jabber::Client(debuglevel=>$debug);

                 

                    my @result = ();
                    $result[0] = "not ok";

                 

                    while( $result[0] ne "ok" ) {
                        while( !($ReCon->Connected()) ) {
                            $ReCon->Connect(
                                hostname        =>  $con_server,
                                port            =>  $con_port,
                                connectiontype  =>  $con_type,
                                ssl             =>  $ssl,
                            );
                        }

                 

                        @result = $ReCon->AuthSend (
                            username=>$con_user,
                            password=>$con_password,
                            resource=>$con_resource,
                            timeout => 60,
                        );

                 

                        $result[0] = "not ok"
                            unless $result[0];
                    }

                 

                    return $ReCon;
                }

                 

_______________________________________________
Jabberd2 mailing list
[email protected]
http://lists.xiaoka.com/listinfo.cgi/jabberd2-xiaoka.com

Reply via email to