Site icon Developershell

Do you remember the RAM Disk?

Not so long ago, I joined a software modernization project where my initial goal was to increase transparency, by giving better insight for the client and for management about the work that is being done by the team. When you re-engineer parts of the application or move them to a different technology stack, it is pretty hard to get a grasp on what is left to be done and what is finished.

My plan was to go through each commit the dev team makes and extract a set of metrics or indicators if you will that we expect to grow or to shrink in time, so the plan was easy

  1. Get the history of the dev branch
  2. For each commit on the branch
    1. Download the changes
    2. Run analysis

The output was a CSV file that included the metrics per commit, over which it was really easy to plot some charts, but I wasn’t really happy with the outcome.

They had more than 400 commits and that point, each state contained more than 10000 files, so running the application had to download and open about 4 million files, and took about 25-30 minutes. Now I know this doesn’t feel much, producing the data for commits in the past and from here onwards just complete with the new commits was the plan, and worked like a charm but, at that moment I didn’t had the analysis part set in stone so, I was still changing what to look for in each file.

My dilemma was to spare my SSDs life while speeding up the whole I/O part in some way, when suddenly, I heard a voice from the past giving me hope. It was whispering “raaaammm diiiisk!”

A ram disk is a great little utility that allocates a portion of your RAM, and exposes it to the operating system as a physical disk. I used this like 10 years ago as a security measure, when I was working in the casino industry. Our bootloader decrypted the application to the RAM and ran the app from there so anybody who disconnected the computer lost access to the readable files.

So I installed one and taddaaaaaa, the whole thing ran under 5 minutes.

Exit mobile version