qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vavricka <vavricka.to...@gmail.com>
Subject Re: Java Broker performance
Date Fri, 10 Nov 2017 08:57:34 GMT
Hi, 

when consumer is not attached sending of messages is slow too. We were
running performance tests for Java Broker 6.1.1 before 6 months and there
were no issues (throughput for 1K messages was around 10MB/s).


rgodfrey wrote
> Hi Tomas, 
> 
> are you saying that there is a significant degradation in performance 
> between 7.0.0 and prior versions for this scenario, or do you see the same 
> performance in 6.1.x? 
> 
> In terms of consuming - is the performance slow if you are consuming from
> a 
> queue with 1000 messages already in it, or is the slowness just caused by 
> the slow producer? 
> 
> Thanks, 
> Rob

Code below is for JMS client 0.27.0 (without catching exceptions) which
behaves similarly as client based on proton 0.18.1.

Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.qpid.jms.jndi.JmsInitialContextFactory");
properties.setProperty("connectionfactory.connection",
"amqp://localhost:20406?jms.username=C7&jms.password=C7");
properties.setProperty("topic.broadcastAddress", "broadcast");
InitialContext context = new InitialContext(properties);

Connection connection = ((ConnectionFactory)
context.lookup("connection")).createConnection();
Session session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
MessageProducer broadcastProducer = session.createProducer((Destination)
context.lookup("broadcastAddress"));
connection.start();
char[] chars = new char[1024];
Arrays.fill(chars, 'f');
TextMessage message = session.createTextMessage(new String(chars));
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
message.setJMSType("broadcast.C7_CashTransaction");
System.out.println(Instant.now());
int messageCount = 1000;
for (int i = 1 ; i <= messageCount ; i++)
{
    broadcastProducer.send(message, DeliveryMode.PERSISTENT,
Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
    if (i % 100 == 0)
    {
        System.out.println(Instant.now() + " sent " + i + " messages");
    }
}
System.out.println(Instant.now());

Output of client is below

[main] INFO com.deutscheboerse.amqp_1_0.examples.BroadcastSender - Creating
connection
[AmqpProvider :(1):[amqp://localhost:20406]] INFO
org.apache.qpid.jms.sasl.SaslMechanismFinder - Best match for SASL auth was:
SASL-SCRAM-SHA-256
[AmqpProvider :(1):[amqp://localhost:20406]] INFO
org.apache.qpid.jms.JmsConnection - Connection
ID:0333e24e-c00a-4dd7-91af-57fd1366512c:1 connected to remote Broker:
amqp://localhost:20406
2017-11-10T08:46:31.135Z
2017-11-10T08:46:41.770Z sent 100 messages
2017-11-10T08:46:52.449Z sent 200 messages
2017-11-10T08:47:03.958Z sent 300 messages
2017-11-10T08:47:15.174Z sent 400 messages
2017-11-10T08:47:25.514Z sent 500 messages
2017-11-10T08:47:36.045Z sent 600 messages
2017-11-10T08:47:46.432Z sent 700 messages
2017-11-10T08:47:57.797Z sent 800 messages
2017-11-10T08:48:09.434Z sent 900 messages
2017-11-10T08:48:20.419Z sent 1000 messages
2017-11-10T08:48:20.419Z


Keith Wall wrote
> Hi Tomas,
> 
> That does sound surprising.  These performance tests[1] are run, with
> BDB and using the latest Qpid JMS Client,  against both the Broker-J
> 7.0.0 and 6.1.4 code lines each day, which is consistently showing
> v7.0.0 is faster for the five use-cases exercised by the tests (see
> perftests/etc/testdefs/defaultTests.js).  I am interested to hear
> about your use-case.   Do you have code you can share?
> 
> cheers, Keith.





--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message