From kilobytes to gigabytes, how RAM usage exploded

Written by

in

One of the first ready-made microcomputers was the Altair 8800, that came with a whopping 256 bytes of RAM. Not megabytes or kilobytes, I mean 256 bytes. It was released in 1975 and had an Intel 8080 CPU. It had a bunch of switches and lights to put a program into that RAM and then you could run it. After that you could inspect the memory using the lights and switches to see the results of your computation. The most exciting thing you could do with the bare machine was playing a tune on a nearby AM radio. Of course this machine had a bunch of expansion slots and with a 4 kB RAM expansion card and a serial board (for the terminal and papertape), you could run Microsoft BASIC! The fully expanded machine could have 60 KB of RAM and a floppy disk controller and then it could run CP/M, which was considered a very advanced operating system in those days, at least for microcomputers.

CP/M could run with as little of 16 kB of RAM. But for serious applications you needed 64 kB or close to it. Later 8-bit CP/M machines (appearing around 1985) typically had 128 kB of RAM and left close to 64 kB available for applications.

How to Cope with Little RAM.

CP/M could run WordStar, a very advanced word processor at that time. WordStar could not store the entire document in RAM, but had to store it in a temporary file, split into blocks that were partly filled with data. If you scrolled through the document, different blocks of your file were loaded into RAM. If you inserted text halfway the document, the current block was filled up. If the block was full and you inserted more text, a new block was added to the temporary file. All these temporary file accesses made WordStar slow, but there simply was not enough RAM for large documents.

When you saved the document, all blocks from the temporary file were collected in order and the valid bytes in each block were written to the file.

Another technique frequently used by CP/M applications, was overlays. If you selected a special function, such as table-of-contents generation, spell checking or printing, the program loaded a special subprogram into RAM. Only one of these subprograms could be in RAM at the same time.

The earliest versions of Unix ran on 16-bit machines like the PDP-11. Some of these had only 64 kB of RAM, Text editors used temporary files, like WordStar, as there was not enough RAM to store a large text file in RAM all at once.

Those early Unix machines ran C compilers and these compilers were multi-pass. Even on modern Unix machines, the C preprocessor and the assembler (to convert assembler instructions to object code) are separate programs. In a multi-pass compiler, the first pass reads the source code line by line and then translates it into a slightly different format. The second pass reads the output of the first pass and writes a slightly processed file to the output. The last pass outputs the object file. None of the passes has the entire program in RAM at once and each pass only performs a small part of the compiler job, such as parsing, optimisation, or code generation. On mainframes of the 1960s, multi-pass compilers were a big thing. Some compilers had dozens of passes. These took ages to compile your program, but it could not be done otherwise, given the small memory size of those machines.

640 kB is Enough for Everyone

Even in the days of CP/M, some compilers tried to be much faster than the multi-pass compilers of the day. Turbo Pascal required close to 64 kB of RAM to pull it off, but you did not have to leave the editor and start the compiler each time you wanted to compile. Turbo Pascal could not run on the Altair 8800, as it required a Z-80 CPU.

In the mid 1980s, MS-DOS and the PC clones overtook CP/M and the 8-bit (mostly Z-80 based) machines. A fully loaded PC/XT had 640 kB of RAM, ten times as much as was addressable by an 8-bit machine. The 8088 CPU had a 20-bit address bus and could address 1 MB of RAM. The PC architecture reserved 640 kB of this for main memory.

PCs could run larger programs and it was no longer necessary to use overlays, multi-pass compilers and temporary files in editors. A sizeable document could be stored in RAM at once.

For power users, 640 kB was no longer enough for everyone, so we got memory expansion cards, that could map a small section of RAM at a time. The later PC/AT machines were based on the 80286 CPU, that could address up to 16 MB of RAM, but only in its native “protected” mode, not in the mode of MS-DOS. However, you could use the extra RAM in such a machine, without buying a dedicated memory expansion card. You could move blocks of memory between the extra RAM and the 640 kB base RAM. Special DOS extender programs allowed programs to run in protected mode, while they could still make DOS calls. This became much more efficient and convenient with the 80386 CPU.

The era of MS-DOS was halfway between the era of addresses limited to 16 bits (64 kB maximum, 8-bit CPUs) and the 32-bit era (4 GB maximum). This era also had the 68000, which had a 16-bit data bus and 32 address bits (only 24 bits usable in the original 68000), but RAM was typically between 512 kB and 2 MB. In this category we have the early Apple MacIntosh, the Atari ST and the Commodore Amiga.

Early Linux

The first Linux distributions arrived in 1992. Linux could run on machines with as little as 2 MB RAM, 4 to 8 MB to be really usable. With an 80486, 16 MB of RAM and a decent SVGA card, you could have a capable graphical workstation.

Linux runs most GNU tools, which were designed to run with megabytes of memory. It made no sense to split the compiler into 30 passes or to use temporary files on disk in text editors. You did have enough RAM to load full book-sized text files into RAM at once.

Linux supported demand paged virtual memory, so you could use more memory than you had RAM, by swapping to disk. Things ground to a screeching halt when too little real RAM was available, but gone were the days of squeezing the last kilobyte out of your 640 kB base memory, which was still a thing in MS-DOS at the time, Demand paging also made overlays completely obsolete.

Full 32-bit systems, could use up to 4 GB of RAM without special tricks. With Windows NT and Windows 95, those extra megabytes could finally be used effectively. Gigabytes of RAM was still way out of reach for personal computers in the early to mid 1990s..

From Megabytes to Gigabytes

But why was 16 MB enough 30 years ago and why is 4 GB too little today?

Of course, Linux gained a lot of functionality in the last 30 years:

  • Internet protocols, including protocols with encryption. IPv6 support is now standard and TLS (Transport Layer Security) is a requirement for all web access.
  • Unicode and locale support. Originally, Unix used ASCII only. It was already a good thing if Unix programs were 8-bit clean (they ignored and passed unchanged non-ASCII bytes). When converting strings to uppercase or lowercase, only the ASCII characters counted. When sorting strings, it was by byte values. In the mid 1990s, most Linux systems used 8-bit ISO-8859 character sets. Language-dependent case conversion rules and sorting rules were introduced. The ASCII character set had only 95 printable characters, while Unicode has close to 160 thousand code points. Font files are consequently much larger. Working with full Unicode requires complex algorithms and large tables. Concepts like bidirectional text rendering, normalisation, case conversion and collation will require more memory.
  • Device support, including USB, wifi adapters and multimedia. Drivers for some older devices (most notably ISA cards) get removed over time, but these are small drivers and comparatively few are removed. The number of devices added is much larger.

Further there are large monolithic applications

  • The web browser. Originally a web browser was intended to retrieve HTML files using the HTTP protocol and display them on the screen. Already in the 1990s, images had to be displayed inside pages. But today we need a complete execution environment for Javascript and WebAssembly programs (an operating system in its own right) and video players complete with DRM support.
  • Office suites such as LibreOffice,.
  • The GNOME desktop

Finally there are completely newly designed tools, like the LLVM compiler toolchain. These tools are designed with “unlimited memory” in mind. Even though LLVM-based compilers like Rust and Zig can still run in 4 GB, they do use large amounts of RAM. With less than 2 GB you cannot realistically run Firefox on Linux anymore, so consider this the practical minimum RAM requirement for Linux.

The 64-bit Era

As early as 1992, the DEC Alpha CPU was one of the first 64-bit CPUs. It was fully designed as a 64-bit CPU, not an extension to a 32-bit CPU. The 64-bit MIPS was even earlier. At this time, the PC market was still transitioning from 16-bit to 32-bit. Address size was the main driver for the transition to 64 bits and apparently the need for gigabytes of RAM was already anticipated in the early 1990s.

The PC platform transitioned to 64-bit around 2010. The AMD-64 was available as early as 2003, but 64-bit Windows only got mainstream with Windows 7. In 2010, 3 to 4 GB of RAM was considered adequate. Memory requirements hanven’t increased that much since 2010. You can still get by with a mere 8 GB of RAM.

In 2026, the RAM size of the average PC decreased for the first time in history. This is caused by the extreme shortage and price increase of RAM. A few years ago, we would buy 32 GB of RAM without a second thought. Now the price difference between 16 GB and 32 GB is way to high.

AI could boost RAM sizes in PCs again, as soon as enough of it will be available to personal computers again.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *