Re: [PATCH] PostgreSQL DLR speedup

Giulio Harding <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
On a related note, Ben, what hardware did you get those messages-per- 
second (with DLRs) measurements? We're just adding DLR support to our  
gateway + applications, and we're going to have to revisit our  
benchmarks for our system to take into account delivery receipts. Is  
that ~200 messages a second MTs + subsequent DLRs together? (i.e. a  
hundred of each per second?)

Also, out of curiosity, why aren't DLRs handled/queued in the same  
way as MOs and MTs (such that they're written to a local store and  
can survive a kannel restart), given that this would be much faster  
than using an external DB...

Cheers,

On 10/11/2006, at 2:50 AM, Ben Suffolk wrote:

> Hi,
>
> I have been doing some benchmarking on the pgsql DLRs. I actually  
> wrote a quick application as opposed to using kannel. The  
> application simulated message sending and DLRs by  looping a  
> thousand times over the following :-
>
>  1. Adding a random number of messages into the DLR table (and  
> storing them in an in memory hash)
>
>  2. Deleting a random number of messages from the DLR table (based  
> on a random selection from the hash)
>
>  3. Updating a smaller random number of messages in the DLR table  
> (again select from the hash).
>
> These test were carried out on a pretty old box running FreeBSd 6.1  
> and PostgreSQL 8.1.
>
> I ran the benchmark a number of times, and with the existing SQL I  
> was anywhere between 100 and 140 messages a second.
>
> I updated the SQL (the delete and update) to remove the OID  
> selection bit. I did not add any LIMIT so that it will still work  
> with the earlier versions of pgsql. Again after running this a  
> number of times I would average between 199 and 201 messages a  
> second (It was a lot more consistent this time).
>
> Attached is the patch.
>
> Regards
>
> Ben
>
> <dlr_pgsql.patch>

--
Giulio Harding
Systems Administrator

m.Net Corporation
Level 2, 16 Leigh Street
Adelaide SA 5000, Australia

Tel: +61 8 8210 2041
Fax: +61 8 8211 9620
Mobile: 0432 876 733
MSN: [email protected]

http://www.mnetcorporation.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.