Saturday, April 9, 2011

Memory, Misty or Not

Lack of memory is a pain. Personally it is inconvenient. On a computer it is a real pain. But figuring it out can be sort of fun, getting your fingers dirty in the inner bowels of the machine.

The machine in this case is the Fujitsu Lifebook P1630

I've learned a lot of new jargon. For example:

2GB DDR2 667MHz PC2-5300 Memory Upgrade for Fujitsu-Siemens LifeBook P Series P1630. 1.8v 200-pin Non-Parity Un-Buffered

is translated as follows:
2GB Short answer: Two billion bytes of Random Access Memory (RAM)
Long answer: Approximately. Watch this space...

DDR2 One of at least three electrical forms of RAM, operating at 1.8 volts
Double Data Rate Synchronous Dynamic Random Access
Memory interface.
In addition to double pumping the data bus as in DDR SDRAM
(transferring data on the rising and falling edges of the bus clock
signal), DDR2 allows higher bus speed and requires lower power
by running the internal clock at half the speed of the data bus. You
cannot substitute one for the other for at least two reasons:
  • the voltages are different
  • the notch in the chip is different

The clock rate (sample rate) for the RAM

Synchronous Dynamic Random Access Memory (SDRAM) is
Dynamic Random Access Memory (DRAM) that is synchronized
with the system bus.
Classic DRAM has an asynchronous interface, which means that
it responds as quickly as possible to changes in control inputs.

SDRAM has a synchronous interface, meaning that it waits for
a clock signal before responding to control inputs and is
therefore synchronized with the computer's system bus.
The clock is used to drive an internal finite state machine that
pipelines incoming instructions. This allows the chip to have
a more complex pattern of operation than an asynchronous
DRAM, enabling higher speeds.
Pipelining means that the chip can accept a new instruction
before it has finished processing the previous one.

PC2-5300 PC2-xxxx denotes theoretical bandwidth.


This refers to the voltage applied to the RAM. DDR3 operates
at 1.5, so the voltage difference is one of the reasons the various
DDR variations are not compatible.

200 Pin

(as distinguished from 240 pin). These are the number of
connections on the edge of the RAM.
 Desktop computers use 240 pin RAM, while laptops use 200 pin


Parity refers to having an extra data byte for ECC (Error correction

Registered (also called buffered) memory modules have a register
between the SDRAM modules and the system's memory controller.
They place less electrical load on the memory controller and allow
single systems to remain stable with more memory modules than
they would have otherwise. Registered memory is more expensive
because of the additional components, so it is usually found only
in applications where the need for scalability and stability
outweighs the need for a low price (servers, for example). Although
most server-grade memory modules are both ECC and registered,
there are registered non-ECC modules and non-registered ECC
There is a performance penalty for using registered memory. Each
read or write is buffered for one cycle between the memory bus
and the DRAM, so the registered RAM can be thought of as
running  one clock cycle "behind" an equivalent unregistered

I've built a spreadsheet that calculates memory usage  based on the free command. I set a base configuration of kernel, operating system, and GUI and record the output of free. The usage is the sum of the used column entries, comprising
    -/+ buffers/cache:

I then load (or unload) a single program. Again, the usage is the sum of the used column entries. The usage of the program is the difference in the original usage and the new usage.

In my present setup (Linux kernel, openSUSE 11.4, KDE 4.6) I have 1 GB of RAM and 2 GB of Disk Swap.

The results are variable. They depend on what other apps have already loaded common libraries. They also depend on activity since the system moves stuff from main memory to cache to swap depending on what apps and associated files are in demand. For example, on one app whenever you type something the usage jumps to 16 MB, but wait a few seconds without further activity and it settles back out at 6MB.

With those caveats, the following shows representative usage:
  • With minimal desktop (Firefox, Basket, konqueror, and kontact)  40 MB free (1.3GB used)
  • Firefox is a memory hog: 122MB
  • Konqueror uses 78 MB.
  • GnuCash uses 60MB.
  • The Oracle VirtualBox platform uses 48MB.
  • Baskets uses 25 MB.
  • Kontact uses 7 MB.
  • But then start Windows in the VBox: it immediately gobbles 506 MB with no applications visibly running.
  • Start TurboTax: another 10 MB.
Suffice it to say we need to get more RAM.

No comments: