Reducing Transactional Overhead-opracowanie

Nasza ocena:

3
Wyświetleń: 399
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Reducing Transactional Overhead-opracowanie - strona 1

Fragment notatki:

Reducing Transactional Overhead
The default value of 1 for the configuration options daemon_memcached_r_batch_size [1736] and
daemon_memcached_w_batch_size [1737] is intended for maximum reliability of results and safety
of stored or updated data.
Depending on the type of application, you might increase one or both of these settings to
reduce the overhead of frequent commit operations. On a busy system, you might increase
daemon_memcached_r_batch_size [1736], knowing that changes to the data made through
SQL might not become visible to memcached immediately (that is, until N more get operations were
processed). When processing data where every write operation must be reliably stored, you would
leave daemon_memcached_w_batch_size [1737] set to 1. You might increase it when processing
large numbers of updates intended to only be used for statistical analysis, where it is not critical if the
last N updates are lost in case of a crash.
For example, imagine a system that monitors traffic crossing a busy bridge, recording approximately
100,000 vehicles each day. If the application simply counts different types of vehicles to
analyze traffic patterns, it might change daemon_memcached_w_batch_size [1737] from
1 to 100, reducing the I/O overhead for commit operations by 99%. In case of an unexpected
outage, only a maximum of 100 records could be lost, which might be an acceptable margin of
error. If instead the application was doing automated toll collection for each car, it would keep
daemon_memcached_w_batch_size [1737] set to 1 to ensure that every toll record was
immediately saved to disk.
Because of the way InnoDB organizes the memcached key values on disk, if you have a large number
of keys to create, it can be faster to sort all the data items by the key value in your application and add
them in sorted order, rather than creating them in arbitrary order.
The memslap command, which is part of the regular memcached distribution but not included with
the MySQL server, can be useful for benchmarking different configurations. It can also be used to
generate sample key/value pairs that you can use in your own benchmarking. See Section 15.6.3.3.6,
“libmemcached Command-Line Utilities” for details.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz