Temos um servidor em um centro de colocation (um servidor físico real, não uma VM), rodando o Debian de 64 bits ( uname -r
: 3.16.0-4-amd64
).
/proc/meminfo
reporta cerca de 4 GiB de memória total:
$ head -n 1 /proc/meminfo
MemTotal: 4051692 kB
free
relata o mesmo (eu olhei apenas para a coluna total
; não estou falando sobre usado, livre, compartilhado, buffers, em cache):
$ free -k
total used free shared buffers cached
Mem: 4051692 3867356 184336 220908 63948 1203596
-/+ buffers/cache: 2599812 1451880
Swap: 15728208 652540 15075668
E o mesmo acontece com dmesg | grep Memory
:
$ dmesg | grep Memory
[ 0.000000] Memory: 4034240K/4185236K available (5287K kernel code, 949K rwdata, 1836K rodata, 1208K init, 840K bss, 150996K reserved)
Mas dmidecode relata 4 * 2 GiB = 8 GiB de RAM, se eu entendi corretamente:
$ sudo dmidecode --type memory
# dmidecode 2.12
SMBIOS 2.6 present.
Handle 0x0008, DMI type 5, 24 bytes
Memory Controller Information
Error Detecting Method: 64-bit ECC
Error Correcting Capabilities:
Single-bit Error Correcting
Supported Interleave: One-way Interleave
Current Interleave: One-way Interleave
Maximum Memory Module Size: 4096 MB
Maximum Total Memory Size: 16384 MB
Supported Speeds:
Other
Supported Memory Types:
DIMM
SDRAM
Memory Module Voltage: 3.3 V
Associated Memory Slots: 4
0x0009
0x000A
0x000B
0x000C
Enabled Error Correcting Capabilities:
Single-bit Error Correcting
Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM1A
Bank Connections: 0 1
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Error Status: OK
Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM1B
Bank Connections: 2 3
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Error Status: OK
Handle 0x000B, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM2A
Bank Connections: 4 5
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Error Status: OK
Handle 0x000C, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM2B
Bank Connections: 6 7
Current Speed: Unknown
Type: DIMM SDRAM
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Error Status: OK
Handle 0x002A, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Single-bit ECC
Maximum Capacity: 16 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x002C, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x002A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM1A
Bank Locator: BANK0
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Micron
Serial Number: 501C6FDC
Asset Tag: AssetTagNum0
Part Number: 9JSF25672AZ-1G4D1
Rank: Unknown
Handle 0x002E, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x002A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM1B
Bank Locator: BANK1
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Micron
Serial Number: 2A1C6FDC
Asset Tag: AssetTagNum1
Part Number: 9JSF25672AZ-1G4D1
Rank: Unknown
Handle 0x0030, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x002A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM2A
Bank Locator: BANK2
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Micron
Serial Number: 511C6FDC
Asset Tag: AssetTagNum2
Part Number: 9JSF25672AZ-1G4D1
Rank: Unknown
Handle 0x0032, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x002A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM2B
Bank Locator: BANK3
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Micron
Serial Number: 4B1C6FDC
Asset Tag: AssetTagNum3
Part Number: 9JSF25672AZ-1G4D1
Rank: Unknown
O que estou perdendo?
É um servidor em um centro de colocation, então infelizmente não consigo ver facilmente o que está instalado fisicamente.
Editar:
man dmidecode
says "Mais frequentemente, as informações contidas nas tabelas DMI são imprecisas, incompletas ou simplesmente erradas." Talvez o dmidecode simplesmente relate dados errados?
Editar:
Esta não é uma duplicata de Por que o Linux relata a memória" gratuita "de maneira estranha? . Essa questão é sobre memória livre, e confusão decorrente de buffers e cache tirando isso. Estou não preocupado com a memória livre, apenas sobre a memória total. Não deixe meu uso do comando free
enganá-lo: eu não o usei para ver a quantidade de memória livre, apenas a quantidade de memória total. Se alguém ainda acha que esta pergunta é uma duplicata, por favor, me explique porque eu não entendo.
Editar: dmidecode -t1
conforme solicitado por Lenniey
$ sudo dmidecode -t1
# dmidecode 2.12
SMBIOS 2.6 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Supermicro
Product Name: X8SIL
Version: 0123456789
Serial Number: 0123456789
UUID: 49434D53-0200-9037-2500-379025009946
Wake-up Type: Power Switch
SKU Number: To Be Filled By O.E.M.
Family: To Be Filled By O.E.M.