I am running Linux Mint 17 on my laptop. When using applications (mainly Web Browsers) the machine freezes for little time periods. The CPU indicates 100% usage at such times, but this only seems to happen when there are other applications running as well.
Due to this reason, I can't decide whether the issue is with not enough RAM or not enough CPU power. For example, can it be that the high memory usage causes memory to be written to swap and that causes the high CPU usage(but in situations that freeze, tools like top and glances show that Firefox is using 100 CPU)?
So what I need to know is how do I diagnose the root cause of the machine freezing? Are there tools to check the root cause of machine slowness?
The reason why I need to know the root cause is because if it is RAM I can add more RAM or try something like zram. But if it CPU I'll have to consider buying a new laptop.
If it matters, my laptop is HP 1000-1205TX Notebook PC with 4 GB RAM.