The decode-dimms program from i2c-tools package can be used to extract spd information from the ram modules which provides details about the module including the timings, clock speed, internal layout of the memory blocks including rank and bank count.
The command can be installed with the following commands:
sudo apt-get install i2c-tools sudo modprobe eeprom decode-dimms
The number of ranks and banks determines the performance of the ram module. In general more ranks are better, and fewer banks are better. For example:
1. Ubuntu desktop system
The ram setup on this system is:
Size: 16G+16G (Dual Channel) Timings: 16-16-16-39 Clock: 2400 MT/s
Now run the program as follows:
The command output a lengthy page of information, but we are interested in the section titled: "Memory Characteristics". It should look something like this:
---=== Memory Characteristics ===--- Maximum module speed 2400 MT/s (PC4-19200) Size 16384 MB Banks x Rows x Columns x Bits 16 x 16 x 10 x 64 SDRAM Device Width 8 bits Ranks 2 Rank Mix Symmetrical Primary Bus Width 64 bits AA-RCD-RP-RAS (cycles) 16-16-16-39 Supported CAS Latencies 25T, 20T, 19T, 18T, 17T, 16T, 15T, 14T, 13T, 12T, 11T, 10T, 9T
The following lines are of interest:
Banks x Rows x Columns x Bits: 16 x 16 x 10 x 64 Ranks: 2 SDRAM Device Width: 8 bits
The output above shows there are 2 Ranks and total of 16 Banks (in each rank).
Device width is 8-bit, so this is a 2Rx8 ram module.
The total size of the memory on each module (stick) can be calculated with the following formula:
Nos of Ranks x Nos of banks x Nos of Rows x Nos of Columns x Nos of bytes = Total memory size of ram stick (DIMM Module)
We can use the above information to calculate the total memory size on this stick as follows:
2 (ranks) x 16 (banks) x 2^16 (rows) x 2^10 (columns) x 64/8 BYTES = 16 GigaBytes
2. Machine 2: Asus TUF A17
Size: 8G+8G (Dual Channel) Timings: 22-22-22-52 Clock: 3200 MT/s
---=== Memory Characteristics ===--- Maximum module speed 3200 MT/s (PC4-25600) Size 8192 MB Banks x Rows x Columns x Bits 8 x 17 x 10 x 64 SDRAM Device Width 16 bits Ranks 1 Primary Bus Width 64 bits AA-RCD-RP-RAS (cycles) 22-22-22-52 Supported CAS Latencies 28T, 26T, 25T, 24T, 23T, 22T, 21T, 20T, 19T, 18T, 17T, 16T, 15T, 14T, 13T, 12T, 11T, 10T
On this laptop we have 2 identical ram sticks and each one has the following configuration:
Banks x Rows x Columns x Bits: 8 x 17 x 10 x 64 Ranks: 1
The memory is arranged in 1 Rank with 8 Banks. So this is a 1Rx8 memory.
Applying the earlier formula:
1 (ranks) x 8 (banks) x 2^17 (rows) x 2^10 (columns) x 64/8 BYTES = 8 Giga Bytes
1Rx8 performs better compared to 2Rx16
Onboard ram - No SPD available
Laptops with onboard soldered ram will not have any spd information available, so this command would fail. For example my Acer Swift 3 laptop has 16gb onboard ram and running the decode-dimms command shows the following:
[email protected]:~$ decode-dimms # decode-dimms version 4.3 Memory Serial Presence Detect Decoder By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, Jean Delvare, Trent Piepho and others Number of SDRAM DIMMs detected and decoded: 0 $
Then you have to look for other ways to find the memory timing information. For example, the cpu-z windows utility might show some of the timing information, however rank and bank details might be totally inaccessible.
More Ranks = Better performance
The number of ranks of a memory module (dimm) affects its performance. In general more ranks are better and a dual rank ram module will have better read/write speeds compared to single rank modules.
Ranks are basically groups of memory blocks that can be accessed independantly. So dual rank means memory on 2 groups. The rank is usually selected with the
This is because dual rank memory modules have partial-parallelism internally. For instance when the module is waiting for data to be read from one rank, it can perform another operation on another rank without waiting. Though this will not double the performance, it will certainly boost it by a noticeable factor.
Links and Resources
https://en.wikipedia.org/wiki/Memory_rank - Wikipedia article explaining memory ranks.