?

Log in

No account? Create an account

More Async Observations

« previous entry | next entry »
Dec. 19th, 2007 | 01:38 am

Looking through the output of the latest benchmark run of libmemcached I just noticed this:

Nonblock
Testing mdelete_generate 1.119 [ ok ]
Testing delete_generate 0.983 [ ok ]

This means that the non-blocking version of the library is a tad faster then the multi delete support.

So I ask myself, is the multi delete support of value then? Does it matter if the above is true to have multi methods?

Semantic sugar is fine, but I am really wondering if it makes an ounce of sense.

I have the multi-set functions done, but I am wondering now if I should bother with committing them.

They add 3.5 K to the size of the library, which is not much.

More important is the question of whether or not they extend the library just a little too much. Each function just increases complexity. If someone can get the same performance by just writing a loop and using the asynchronous behavior, does it make much sense?

Is it just semantic sugar?

Link | Leave a comment | Share

Comments {4}

(no subject)

from: jamesd
date: Dec. 20th, 2007 06:09 am (UTC)
Link

It's just semantic sugar on a local server. When it's over a network with lots of clients and lots of other traffic the router can be the bottleneck. Doesn't matter how fast the library is if the router isn't able to keep up. So, no multiple operations = lower maximum throughput. And annoyed network people when it kills the corporate phone system or whatever else is running on the network that's latency-sensitive.

Reply | Thread

Use a database driver with batch sql capabilities

from: brooksaix
date: Dec. 20th, 2007 06:43 pm (UTC)
Link

Using a database driver that is able to batch together all the separate deletes would solve the network problem, which means this is just semantic fructose. This just add complexity that can be done in other, more standard, ways and makes the software harder to use.

I could be very wrong if some popular databases driver don't support batch sql, but the ones I use do.

Reply | Parent | Thread

Brian "Krow" Aker

Re: Use a database driver with batch sql capabilities

from: krow
date: Dec. 20th, 2007 08:39 pm (UTC)
Link

This is memcached though... the batch mode normally only works when you are using async() connections, but I have added new code to allow them to work no matter the type of connection you use.

Reply | Parent | Thread

Brian "Krow" Aker

(no subject)

from: krow
date: Dec. 20th, 2007 09:26 pm (UTC)
Link

The question is not multi-commands per packet, the question is whether or not-async should be required for it.

Reply | Parent | Thread