Il giorno 13/dic/2010, alle ore 18.46, [email protected] ha scritto: > Hello Roberto, > > 1. if I will create 1000 elements it will pre allocate 1000 * 65K?
No it will pre-allocate 4096*1000 as only the space for keys is malloced and zeroed (but i have already find a way to avoid this reducing the pre-allocation to 2*1000). The space for values is mmaped but untouched until there is a real value on it. > 2. how good idea to use it for few millions of items? or it's better > to go with memcached then? if the optimization algorithm does it work as i hope, the O(n) impact should be very low and so you can put a lot of values in it. As the api is independent of the implementation there is a lot of space for every kind of optimizations. > 3. get/set/del operations are asyn or they are atomic? not atomic for sure. if you are in async mode the locking for write/del is a noop, otherwise it came in So i prefer to define it as opportunistic-asynced and opportunistic-thread-safe :) -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
