0

I have a laptop dell inspiron 3501(linux ubuntu 22.04 as OS) with ram 8gb, ssd 256gb, processor i5-1135G7. I use this laptop for programming mostly. But sometimes my laptops doesn't respond at all because of the applications load.

For example if I use postman, vscode, multiple chrome tabs, microsoft teams, terminals and sublime text at once then my laptop doesn't responds properly and sometimes needs to restart the laptop with power off button physically.

So how can I increase my laptop performance so that I can do those things in parallel smoothly without any disturbance ?

I'm sorry if these type of questions are not allowed in this site, please suggest me the right community.

Result of free -m

               total        used        free      shared  buff/cache   available
Mem:            7677        5821         765         605        1090         869
Swap:           2047        1638         409
D_P
  • 103
  • 3

2 Answers2

2

Both your RAM and swap are almost full. Your computer locks up because it's running out of memory.

8 GB is barely enough for browsing the Internet nowadays. I'd suggest upgrading to at least 16 GB.

Your laptop has 2 memory slots so there's currently either a single 8 GB module in there with the other slot unoccupied, or two 4GB modules and you'll have to replace one of them.

  • 1×8GB: In this situation you can add another 8 GB or 16 GB module, for a total of 16 GB or 24 GB.
  • 2×4GB: Here you have two options: upgrade single 4 GB module to 16 GB (for a total of 20 GB) or upgrade both to 8 GB each (16 GB total). With both modules upgraded you'll get slight memory performance boost from full dual channel, but you'll have 4 GB less of usable RAM.

When shopping for memory modules, make sure to match not only memory type and voltage, but also operating frequencies. Adding a slower memory module will slow down the current one too. Buying faster is generally ok - it just won't operate at its full potential.

Consider also increasing swap size to 4 GB or even a bit more. This will give the OS some extra room for dumping data from RAM to disk in low memory situations.

Regarding disk space, it really depends on your usage and habits. I've been doing professional software development on a 256 GB drive for the last 3 years. If you have 30+ GB of free disk space at all time, then the performance is unlikely to suffer.

Changing filesystems to btrfs with zstd compression will likely let you save a couple GBs while increasing performance, but it's quite a lot of work and I wouldn't recommend doing this with valuable data unless you really know what you're doing.

gronostaj
  • 58,482
1

Increase your swap space. Swap acts as virtual memory when RAM is full, and your current 2GB swap is insufficient. I am using an i3 with 8GB of RAM and a 256GB SSD. After increasing the swap size to 24GB, the machine is working fine for me. I noticed that my swap usage occasionally reaches 12 to 14GB, so I recommend setting the swap size to at least 16GB.