1

I do programming on my laptop.

When I open VS Code without GitKraken or vice versa, my laptop runs normally.

But always lagging when I open them both.

Here is my system specs:

  • Acer Aspire E5-475G.
  • Intel Core i3-6100U (2.3 GHz, 3MB L3 Cache).
  • Nvidia GeForce 940MX with 2 GB Dedicated VRAM.
  • 2 GB DDR4 Memory.
  • ChaletOS 16.04.2 LTS 64-bit (Xubuntu based).

The CPU and memory usages are not reaching their peak.

Other processes:

  • XAMPP.
  • Opera web browser.

So how to find what's wrong?

Should I upgrade my laptop?

Update

yahya@Yahya-Aspire-E5-475G:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           1,8G        1,3G        118M        168M        408M        111M
Swap:           15G        798M         15G
yahya@Yahya-Aspire-E5-475G:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           1,8G        1,2G        112M        149M        477M        191M
Swap:           15G        879M         15G
yahya@Yahya-Aspire-E5-475G:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           1,8G        1,2G        125M        140M        447M        181M
Swap:           15G        943M         15G
yahya@Yahya-Aspire-E5-475G:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           1,8G        1,2G         97M        141M        506M        211M
Swap:           15G        1,0G         15G

The task manager shows memory usage 75% in average, so I think there's still enough space.

But I don't understand with the output of free -h above. What is the true free space of my memory?

Yahya
  • 83
  • Guessing your RAM is exhausted when running big apps. Please post the output of the command free -h when running those two apps. Related: https://askubuntu.com/questions/550604/how-to-read-memory-usage – Melebius Jan 31 '17 at 08:27
  • 1
    You don't need a 15G swap, it's useless, once the system starts swapping performance goes down and you're doomed. And don't attempt to use 2 electron apps with only 2G of RAM, either upgrade to 4/8G or use lighter apps (regular git + geany). – MGP Dec 27 '17 at 20:45
  • @ManuelGutierrez I did. – Yahya Jan 09 '18 at 01:51

1 Answers1

0

Your free -h output shows that your swap usage rises significantly. It means the contents of RAM get moved to swap space. Swap is placed on the HDD and it’s much slower than RAM (unless you are using SSD).

You can read about swappiness to learn why swap is used before RAM is physically exhausted. But since your swap usage is higher than the RAM space available, the RAM size does not suffice to hold all the data – and this is needed for the smooth performance.

Melebius
  • 11,431
  • 9
  • 52
  • 78
  • The swappiness in my OS has the initial value of 10. Increasing its value really prevents lagging when I open those apps. But I cannot tell whether this change degrades the overall performance, at least for now. I know that I'm running a (local) web server on my laptop, so it probably behaves like a server. – Yahya Jan 31 '17 at 23:19