You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pavel Moravec (JIRA)" <ji...@apache.org> on 2014/05/28 09:21:01 UTC

[jira] [Closed] (QPID-5748) [C++ broker] Make Queue::purgeExpired more efficient by calling AbsTime::now() just once

     [ https://issues.apache.org/jira/browse/QPID-5748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Moravec closed QPID-5748.
-------------------------------


> [C++ broker] Make Queue::purgeExpired more efficient by calling AbsTime::now() just once
> ----------------------------------------------------------------------------------------
>
>                 Key: QPID-5748
>                 URL: https://issues.apache.org/jira/browse/QPID-5748
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker
>    Affects Versions: 0.26
>            Reporter: Pavel Moravec
>            Assignee: Pavel Moravec
>            Priority: Minor
>              Labels: improvement, patch, performance
>             Fix For: 0.29
>
>         Attachments: QPID-5748.patch
>
>
> Queue::purgeExpired method (to remove messages from all queues with TTL expired) currently calls Message::hasExpired() method that calls AbsTime::now() i.e. ::clock_gettime for every individual message with TTL set.
> That system call is redundant to be called in that way. It is enough to call it once before traversing the very first queue and use the value as an argument.
> Proposing a patch (to review also, it's not ideal imho) for that I run a simple performance tests comparison that purged _all_ messages sent there:
> - sending 100k transient messages to each of 300 queues: observed 10% performance improvement (improved purge took 740s and original purge took 807s on my virtual box)
> - sending 10k durable messages to each of 300 durable queues: observed almost no improvement (improved: 114.48s, original: 115.77s i.e. performance gain in 1.1%) - probably disk operations (common to both tests) kill the improvement; if the test won't purge the messages, (linear)store won't take into pla and improvement would be more visible, I guess



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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