[PolyORB-users] Polyorb Performance
Sturm, Peter
Peter.Sturm at rheinmetall.com
Tue Apr 13 16:49:47 CEST 2010
Hi,
that's it! Using sequence<octect> improved the performance.
Transfering a buffer of type tMsg with 10 MB size takes now 200 ms. This seems to be more realistic. Attached the idl file and the client.adb
Thank your very much, Peter.
interface Echo {
string echoString (in string Mesg);
typedef sequence<octet> tMsg;
tMsg echoString2 (in tMsg Mesg);
};
------------------------------------------------------------------------------
-- --
-- POLYORB COMPONENTS --
-- --
-- C L I E N T --
-- --
-- B o d y --
-- --
-- Copyright (C) 2002-2004 Free Software Foundation, Inc. --
-- --
-- PolyORB is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. PolyORB is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
-- License for more details. You should have received a copy of the GNU --
-- General Public License distributed with PolyORB; see file COPYING. If --
-- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- PolyORB is maintained by ACT Europe. --
-- (email: sales at act-europe.fr) --
-- --
------------------------------------------------------------------------------
-- echo client.
with Ada.Command_Line;
with Ada.Text_IO;
with CORBA.ORB;
with Ada.Calendar;
with Echo;
with PolyORB.Setup.Client;
pragma Warnings (Off, PolyORB.Setup.Client);
with PolyORB.Utils.Report;
procedure Client is
package Fix_IO is new Ada.Text_IO.Fixed_IO (Ada.Calendar.DAY_DURATION);
use Ada.Command_Line;
use Ada.Text_IO;
use PolyORB.Utils.Report;
Sent_Msg, Rcvd_Msg : CORBA.String;
Sent_Data : Echo.tMsg;
Rcvd_Data : Echo.tMsg;
-- Data : String (1 .. 1024*1024*2) := (others => ' ');
myecho : Echo.Ref;
Year, Month, Day : INTEGER;
Seconds : Ada.Calendar.DAY_DURATION;
Time_And_Date : Ada.Calendar.TIME;
begin
-- New_Test ("Echo client");
CORBA.ORB.Initialize ("ORB");
if Argument_Count /= 1 then
Put_Line ("usage : client <IOR_string_from_server>|-i");
return;
end if;
-- Getting the CORBA.Object
CORBA.ORB.String_To_Object
(CORBA.To_CORBA_String (Ada.Command_Line.Argument (1)), myecho);
-- Checking if it worked
if Echo.Is_Nil (myecho) then
Put_Line ("main : cannot invoke on a nil reference");
return;
end if;
-- Sending message
Sent_Msg := CORBA.To_CORBA_String (Standard.String'("Hello Ada !"));
Rcvd_Msg := Echo.echoString (myecho, Sent_Msg);
-- Printing result
Put_Line ("I said : " & CORBA.To_Standard_String (Sent_Msg));
Put_Line ("The object answered : " & CORBA.To_Standard_String (Rcvd_Msg));
Sent_Data := Echo.To_Sequence (1024 *1024 * 10);
for I in Integer range 1 .. 10 loop
Put ("Time: ");
Time_And_Date := Ada.Calendar.Clock;
Ada.Calendar.Split (Time_And_Date, Year, Month, Day, Seconds);
Fix_IO.Put (Seconds, 8, 3, 0);
New_Line;
Rcvd_Data := Echo.echoString2 (myecho, Sent_Data);
Put_Line ("The object answered with data of "
& Integer'Image (Echo.Length (Rcvd_Data) / 1024) & " kBytes.");
end loop;
-- End_Report;
exception
when E : CORBA.Transient =>
declare
Memb : CORBA.System_Exception_Members;
begin
CORBA.Get_Members (E, Memb);
Put ("received exception transient, minor");
Put (CORBA.Unsigned_Long'Image (Memb.Minor));
Put (", completion status: ");
Put_Line (CORBA.Completion_Status'Image (Memb.Completed));
End_Report;
end;
end Client;
-----Ursprüngliche Nachricht-----
Von: Thomas Quinot [mailto:quinot at adacore.com]
Gesendet: Dienstag, 13. April 2010 15:51
An: Sturm, Peter
Cc: polyorb-users at lists.adacore.com
Betreff: Re: [PolyORB-users] Polyorb Performance
* Sturm, Peter, 2010-04-13 :
> I'm testing the performance (data throughput) of the Polyorb version GPL
> 2009.
Interesting experiment!
> Therefore I modified the examples in examples/cobra/echo to send 2 MB
> string data multiple times to the server and transmit it back to the
> client.
It would be useful if you could contribute the sources of your benchmark
so that it can be reused to evaluate the performance impact of
configuration or code changes.
> The measured bandwidth was around 6 MB/sec (client & server on same pc
> system). This seems to be very poor compared with other CORBA
> implementations.
>
> Testing with TAO results to a bandwidth of 200 MB/s.
>
> Does anybody have experience of the Polyorb performance?
> Could it be a misconfiguration of the Polyorb installation?
Many factors can contribute to differences in performances. There are
some fundamental design choices in a generic middleware such as PolyORB
where some performance has to be traded off for functionality and
reusability (as opposed to optimization for a specific use case),
but that certainly wouldn't in itself justify a different of that
magnitude for bulk data exchange.
The tasking model and compile-time optimizations you are using could
make a difference. The specific data types used could also intervene, as
well as data handling in the client and server (as opposed to the
middleware). The choice of data types can also explain observed
differences, because some optimizations are very specific to certain
data types in PolyORB.
For example there is specific circuitry for sequence<octet> that is not
currently enabled for strings, and that could explain a visible
performance difference. Could you retry your experiment with a
sequence<octet> and let us know of the result?
Regards,
Thomas Quinot.
--
Thomas Quinot, Ph.D. ** quinot at adacore.com ** Senior Software Engineer
AdaCore -- Paris, France -- New York, USA
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Rheinmetall Defence Electronics GmbH
Brüggeweg 54 - D-28309 Bremen - Tel +49 421 457-01 - Fax +49 421 457-2900 - Sitz der Gesellschaft: Bremen - Register: Amtsgericht Bremen, HRB 9659
Commerzbank AG, Bremen (BLZ 290 400 90) 102213600 - Bremer Bank AG (BLZ 290 800 10) 102077800
Aufsichtsratsvorsitzender: Heinz Dresia - Geschäftsführung: Luitjen Ennenga, Dr. Michael Greth, Georg Morawitz, Ulrich Sasse - www.rheinmetall-defence.com
More information about the PolyORB-users
mailing list