Servidor Debian Linux: tamaño de la caché L1 y L2

Servidor Debian Linux: tamaño de la caché L1 y L2

Posible duplicado:
encontrar el tamaño de caché L2 en Linux

Estoy usando Debian Linux Server y quiero saber el tamaño de la caché L1 y L2. ¿Alguien puede ayudarme, cómo conseguirlo?

Respuesta1

dmidecodedebería darte esta información.

Para mi CPU, por ejemplo, muestra el siguiente resultado:

Handle 0x0002, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1-Cache
    Configuration: Enabled, Not Socketed, Level 1
    Operational Mode: Write Through
    Location: Internal
    Installed Size: 64 KB
    Maximum Size: 64 KB
    Supported SRAM Types:
            Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Data
    Associativity: 8-way Set-associative

Handle 0x0003, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L2-Cache
    Configuration: Enabled, Not Socketed, Level 2
    Operational Mode: Write Through
    Location: Internal
    Installed Size: 256 KB
    Maximum Size: 256 KB
    Supported SRAM Types:
            Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Data
    Associativity: 8-way Set-associative

Handle 0x0004, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L3-Cache
    Configuration: Enabled, Not Socketed, Level 3
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 3072 KB
    Maximum Size: 3072 KB
    Supported SRAM Types:
            Synchronous
    Installed SRAM Type: Synchronous
    Speed: Unknown
    Error Correction Type: Single-bit ECC
    System Type: Unified
    Associativity: <OUT OF SPEC>

De esto puedes ver que tengo un caché L1 de 64kb, un caché L2 de 256kb y un caché L3 de 3072kb.

Respuesta2

Parece que esto es un duplicado de

encontrar el tamaño de caché L2 en Linux

Sin embargo, en ambos casos, dmidecode no funcionó para mí, lo cual tiene sentido, porque informa información del BIOS, que no siempre está presente o es precisa. Entonces, la mejor opción para mí fue:

find /sys/devices/system/cpu/*/cache/index*/size -print -exec cat {} \;
/sys/devices/system/cpu/cpu0/cache/index0/size
32K
/sys/devices/system/cpu/cpu0/cache/index1/size
32K
/sys/devices/system/cpu/cpu0/cache/index2/size
6144K
/sys/devices/system/cpu/cpu1/cache/index0/size
32K
/sys/devices/system/cpu/cpu1/cache/index1/size
32K
/sys/devices/system/cpu/cpu1/cache/index2/size
6144K

Respuesta3

puedes usar lshw para encontrar información de caché. Si no está instalado, deberías obtenerlo del repositorio.

Respuesta4

x86info es una herramienta decente para obtener información del procesador si está ejecutando una caja i386/amd64.

información relacionada