Oracle 5.0 Reference Manual page 1375

Table of Contents

Advertisement

allocated, and a page is always created when a new item needs to be created requiring a chunk of a
particular size. A slab may consist of multiple pages, and each page within a slab contains an equal
number of chunks.
The chunk size of a new slab is determined by the base chunk size combined with the chunk size
growth factor. For example, if the initial chunks are 104 bytes in size, and the default chunk size growth
factor is used (1.25), then the next chunk size allocated would be the best power of 2 fit for 104*1.25,
or 136 bytes.
Allocating the pages in this way ensures that memory does not get fragmented. However, depending
on the distribution of the objects that you store, it may lead to an inefficient distribution of the slabs and
chunks if you have significantly different sized items. For example, having a relatively small number of
items within each chunk size may waste a lot of memory with just few chunks in each allocated page.
You can tune the growth factor to reduce this effect by using the
the growth factor applied to make more effective use of the chunks and slabs allocated. For information
on how to determine the current slab allocation statistics, see
Statistics".
If your operating system supports it, you can also start
This option preallocates all the memory during startup using large memory pages. This can improve
performance by reducing the number of misses in the CPU memory cache.
15.6.2.7.
memcached
If you enable the thread implementation within when building
memcached
When enabled, the threading implementation operates as follows:
• Threading is handled by wrapping functions within the code to provide basic protection from updating
the same global structures at the same time.
• Each thread uses its own instance of the
• TCP/IP connections are handled with a single thread listening on the TCP/IP socket. Each
connection is then distributed to one of the active threads on a simple round-robin basis. Each
connection then operates solely within this thread while the connection remains open.
• For UDP connections, all the threads listen to a single UDP socket for incoming requests. Threads
that are not currently dealing with another request ignore the incoming packet. One of the remaining,
nonbusy, threads reads the request and sends the response. This implementation can lead to
increased CPU load as threads wake from sleep to potentially process the request.
Using threads can increase the performance on servers that have multiple CPU cores available, as the
requests to update the hash table can be spread between the individual threads. To minimize overhead
from the locking mechanism employed, experiment with different thread values to achieve the best
performance based on the number and type of requests within your given workload.
15.6.2.8.
memcached
If you enable verbose mode, using the -v, -vv, or
memcached
Without the verbose options,
• Output when using
The lowest verbosity level shows you:
• Errors and warnings
• Transient errors
Thread Support
uses multiple threads in addition to the
Logs
includes details of the operations being performed.
memcached
-v
Using
memcached
memcached
libevent
to help improve performance.
libevent
options, then the information output by
-vvv
normally produces no output during normal operating.
1355
command line option, which adapts
-f
Section 15.6.4.2,
"memcached
with the
command line option.
-L
from source, then
memcached
system to handle requests.
Slabs

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents