memcached
FAQ
1391
$ memcached -I 5m
If an object is larger than the maximum object size, you must manually split it.
memcached
is very
simple: you give it a key and some data, it tries to cache it in RAM. If you try to store more than the
default maximum size, the value is just truncated for speed reasons.
16.6.5.3: Is it true
memcached
will be much more effective with db-read-intensive applications
than with db-write-intensive applications?
Yes.
memcached
plays no role in database writes, it is a method of caching data already read from the
database in RAM.
16.6.5.4: Is there any overhead in not using persistent connections? If persistent is always
recommended, what are the downsides (for example, locking up)?
If you don't use persistent connections when communicating with
memcached
, there will be a
small increase in the latency of opening the connection each time. The effect is comparable to use
nonpersistent connections with MySQL.
In general, the chance of locking or other issues with persistent connections is minimal, because there
is very little locking within
memcached
. If there is a problem, eventually your request will time out and
return no result, so your application will need to load from MySQL again.
16.6.5.5: How is an event such as a crash of one of the
memcached
servers handled by the
memcached
client?
There is no automatic handling of this. If your client fails to get a response from a server, code a
fallback mechanism to load the data from the MySQL database.
The client APIs all provide the ability to add and remove
memcached
instances on the fly. If within your
application you notice that
memcached
server is no longer responding, you can remove the server from
the list of servers, and keys will automatically be redistributed to another
memcached
server in the list.
If retaining the cache content on all your servers is important, make sure you use an API that supports
a consistent hashing algorithm. For more information, see
Section 15.6.2.4, “
memcached
Hashing/
Distribution Types”
.
16.6.5.6: What is a recommended hardware configuration for a memcached server?
memcached
has a very low processing overhead. All that is required is spare physical RAM capacity.
A
memcached
server does not require a dedicated machine. If you have web, application, or database
servers that have spare RAM capacity, then use them with
memcached
.
To build and deploy a dedicated
memcached
server, use a relatively low-power CPU, lots of RAM, and
one or more Gigabit Ethernet interfaces.
16.6.5.7: Is memcached more effective for video and audio as opposed to textual read/writes?
memcached
works equally well for all kinds of data. To
memcached
, any value you store is just a
stream of data. Remember, though, that the maximum size of an object you can store in
memcached
is 1MB, but can be configured to be larger by using the
-I
option in
memcached
1.4.2 and later, or by
modifying the source in versions before 1.4.2. If you plan on using
memcached
with audio and video
content, you will probably want to increase the maximum object size. Also remember that
memcached
is a solution for caching information for reading. It shouldn't be used for writes, except when updating
the information in the cache.
16.6.5.8: Can
memcached
work with ASPX?
There are ports and interfaces for many languages and environments. ASPX relies on an underlying
language such as C# or VisualBasic, and if you are using ASP.NET then there is a C#
memcached
library. For more information, see
https://sourceforge.net/projects/memcacheddotnet/
.
16.6.5.9: How expensive is it to establish a memcache connection? Should those connections
be pooled?
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...