[pgpool-general: 754] Re: Questions about memory cache functionality in pgpool-II 3.2beta2

Lazáro Rubén García Martínez lgarciam at vnz.uci.cu
Wed Jul 18 08:46:35 JST 2012


Thank you very much for your answer.

Regards.
________________________________________
From: Tatsuo Ishii [ishii at postgresql.org]
Sent: Tuesday, July 17, 2012 6:37 PM
To: Lazáro Rubén García Martínez
Cc: pgpool-general at pgpool.net
Subject: Re: [pgpool-general: 747] Questions about memory cache functionality in pgpool-II 3.2beta2

> Hello every one in the list. I am testing the new functionality on memory query cache. I think the functionality is great but I have some questions related with some configuration parameters.

I assume you are talking about when shmem is used as the cache storage
(some of parameters are not related to memcached case).

> 1. Is there any relation between de parameters memqcache_total_size and memqcache_max_num_cache?

memqcache_max_num_cache is total storage size of
cache. memqcache_max_num_cache is total number of cache entries. Each
cache entry hold a query result. Since the size of query result is
vary, the size of each cache entry can be different.  Thus there's no
exact computational relationship between these numbers. However in
general the bigger memqcache_total_size, the bigger
memqcache_max_num_cache.

> 2. Suppose memqcache_total_size = 5 MB and
> memqcache_cache_block_size = 512 bytes. It means to me that the
> shared memory is devided in a total of 10240 blocks of memory, each
> one with 512 bytes of storage.

Correct.

If the query 1 has a size of 420
> bytes and it is stored in the first block of memory, then another
> query is executed and the storage size of this is 150 bytes, then
> the free memory en the one block is wasted, because the result of
> the second query is stored in other block of memory?

No. Each cache block can hold multiple number of query results.

> 3. What means memqcache_max_num_cache specify the number of cache entries? What means number of cache entries? Is there any relation between memqcache_max_num_cache and the total blocks of memory according to this formula (memqcache_total_size/memqcache_cache_block_size)

See above.

> I'll appreciate your help.
> Regards and thank you very much for your time.
>
> Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
> http://www.antiterroristas.cu
> http://justiciaparaloscinco.wordpress.com
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general

Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com


More information about the pgpool-general mailing list