In bash, .bashrc
(and various other scripts) can load into memory at shell startup. These can be 10 lines long, but can be hundreds (if not thousands) of lines long. Each export will consume a tiny amount of memory, and each function and each alias also a little resources to be held in memory. Another consideration is that we can't just look at the size of the .bashrc
and other scripts as they could have lots of comments which consume no memory.
I would like to remove all startup scripts, start the system, wait a few minutes for things to settle down and then take some kind of baseline, then put the startup scripts back in place, restart the system and perform the same exercise to try and get some kind of resource / performance diff.
Can you suggest what tools might help to determine this? I have a relatively large set of startup scripts, about 15k with many functions and aliases defined, so I'm really curious what impact (if any, as a modern system with 16 GB of memory and a fast modern Core i5, the effect could be negligible) this has upon the system in terms of consumed resources? Even if the impact of my startup scripts is low, I would still love to be able to take a baseline and then a later 'load test' to get some assessment of how systems handle running a given set of applications.