Obtendo a taxa de acertos do cache (leitura / escrita)

1

Existe alguma maneira de descobrir qual é a taxa de acertos do cache de leitura / gravação em um Servidor Red Hat Linux (64 bits)?

Eu tentei usar o sar (9.x), mas não consigo encontrá-lo. O motivo é que, como estou migrando para outro servidor, preciso saber qual é a melhor maneira de configurar o controlador RAID com calculadora iops .

    
por Werner Dijkerman 05.03.2012 / 21:00

1 resposta

0

Você pode tentar o utilitário cachestat pacote perf-tools .

O autor também lista algumas alternativas (possivelmente mais cruas) que as pessoas usam:

A) Study the page cache miss rate by using iostat(1) to monitor disk reads, and assume these are cache misses, and not, for example, O_DIRECT. The miss rate is usually a more important metric than the ratio anyway, since misses are proportional to application pain. Also use free(1) to see the cache sizes.

B) Drop the page cache (echo 1 > /proc/sys/vm/drop_caches), and measure how much performance gets worse! I love the use of a negative experiment, but this is of course a painful way to shed some light on cache usage.

C) Use sar(1) and study minor and major faults. I don't think this works (eg, regular I/O).

D) Use the cache-hit-rate.stp SystemTap script, which is number two in an Internet search for Linux page cache hit ratio. It instruments cache access high in the stack, in the VFS interface, so that reads to any file system or storage device can be seen. Cache misses are measured via their disk I/O. This also misses some workload types (some are mentioned in "Lessons" on that page), and calls ratios "rates".

    
por 24.04.2016 / 14:13

Tags