Dear Steve,<br>pl. add support for storing memcached FLATGS that all clients use!! <br>thanks a lot!!!!!!!!<br>mark<br><br><div><span class="gmail_quote">On 11/5/07, <b class="gmail_sendername">Steve Chu</b> <<a href="mailto:stvchu@gmail.com">
stvchu@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Now replication is ready! You can achieve your HA and scale your
<br>application by multi-reading, and also get profit from amazing<br>performance (high-frequency writing and reading) that memcachedb<br>provided.<br><br>Memcachedb is not that *blocked* you think, with a transaction log buffer!
<br><br>We do a simple testing *AGAIN* on a Dell PowerEdge 2850 box that sets<br>20,000,000 records into memcachedb<br>with a 16 bytes key and 10 bytes value.<br><br>Simply start memcachedb with:<br>./memcachedb -p21211 -d -r -u root -H ./env1 -N -R
<a href="http://127.0.0.1:31211">127.0.0.1:31211</a> -M<br>./memcachedb -p21212 -d -r -u root -H ./env2 -N -R <a href="http://127.0.0.1:31212">127.0.0.1:31212</a> -O<br><a href="http://127.0.0.1:31211">127.0.0.1:31211</a>
-S<br><br>And here is a simple testing:<br><br>=================================================================<br>#include <stdio.h><br>#include <string.h><br>#include <time.h><br>#include "memcache.h
"<br><br>int main(int argc, char **argv){<br> int ret = 0;<br> char key[32] = {0};<br> char val[32] = {0};<br> int n = 0;<br> time_t start;<br> time_t end;<br> struct memcache *mc = mc_new();<br>
mc_server_add4(mc, "<a href="http://127.0.0.1:21211">127.0.0.1:21211</a>");<br><br> start = time(NULL);<br> for (n=0; n<20000000; n++){<br> sprintf(key, "%016d", n);<br> sprintf(val, "%010d", n);
<br> ret = mc_set(mc, key, strlen(key), val, strlen(val), 0, 0);<br> }<br> end = time(NULL);<br> printf("time cost: %ld second\n", end - start);<br><br> mc_free(mc);<br> return 0;<br>}<br>
====================================================================<br><br>The total time cost is: 2506 second, the db file size is 1.6 GB.<br>It writes almost *8000* records per second to a master in a replicated group.
<br><br>Another testing case for reading:<br>======================================================================<br>#include <stdio.h><br>#include <string.h><br>#include <time.h><br>#include <stdlib.h
><br>#include "memcache.h"<br><br>int main(int argc, char **argv){<br> char *ret = 0;<br> char key[32] = {0};<br> int n = 0;<br> time_t start;<br> time_t end;<br> struct memcache *mc = mc_new();
<br> mc_server_add4(mc, "<a href="http://127.0.0.1:21212">127.0.0.1:21212</a>");<br><br> start = time(NULL);<br> for (n=0; n<20000000; n++){<br> sprintf(key, "%016d", n);<br> ret = mc_aget(mc, key, strlen(key));
<br> if (strlen(ret) != 10){<br> printf("%s\n", ret);<br> }<br> free(ret);<br> }<br> end = time(NULL);<br> printf("time cost: %ld second\n", end - start);
<br><br> mc_free(mc);<br> return 0;<br>}<br><br>======================================================================<br>The total time cost is: 1204 second.<br>It reads *16000+* records per second from a replicas.
<br><br>You can download it here:<br><a href="http://memcachedb.googlecode.com/files/memcachedb-0.1.0.tar.gz">http://memcachedb.googlecode.com/files/memcachedb-0.1.0.tar.gz</a><br><br>For more info, please visit: <a href="http://memcachedb.googlecode.com">
http://memcachedb.googlecode.com</a><br><br>--<br>Steve Chu<br><a href="http://stvchu.org">http://stvchu.org</a><br><br>--~--~---------~--~----~------------~-------~--~----~<br>You received this message because you are subscribed to the Google Groups "memcachedb" group.
<br>To post to this group, send email to <a href="mailto:memcachedb@googlegroups.com">memcachedb@googlegroups.com</a><br>To unsubscribe from this group, send email to <a href="mailto:memcachedb-unsubscribe@googlegroups.com">
memcachedb-unsubscribe@googlegroups.com</a><br>For more options, visit this group at <a href="http://groups.google.com/group/memcachedb?hl=en">http://groups.google.com/group/memcachedb?hl=en</a><br>-~----------~----~----~----~------~----~------~--~---
<br><br></blockquote></div><br>