Score:0

How can I understand the reason my computer freezes?

ca flag

I would like to ask a question: Due to my job I often use many programs together and sometimes my computer freezes, sometimes I can really feel its pain. This often happens when I both use Skype (video calls) and IntelliJ or Virtual Machine is on.

How can I understand if this is due by CPU or RAM (or maybe something else)?

Thank you for your help.

EDIT. As suggested by @heynnema, here is the result for commands free -h

              total        used        free      shared  buff/cache   available
Mem:          5,8Gi       4,2Gi       327Mi        67Mi       1,2Gi       1,2Gi
Swap:         2,0Gi       679Mi       1,3Gi

and swapon -s

Filename                Type        Size    Used    Priority
/swapfile               file        2097148 695552  -2
24601 avatar
in flag
Does this answer your question? [How do I monitor my CPU and RAM usage without installing any software?](https://askubuntu.com/questions/1369355/how-do-i-monitor-my-cpu-and-ram-usage-without-installing-any-software)
Fabio Manniti avatar
ca flag
That definetly helps but the thing is in this way I must stare at the terminal while I'm using other software. It would be helpful to have a sort of graph so I can see what was happening while I was working
heynnema avatar
ru flag
Edit your question and show me `free -h` and `swapon -s`. Start comments to me with @heynnema or I'll miss them.
heynnema avatar
ru flag
When you provide requested data, you have to let the requestor know by sending a comment to them that starts with @heynnema (in my case). `Stacer` is not the answer. Use the standard `System Monitor` app instead. Or use `top`. Let me know if you're still freezing, and I can put together an answer for you.
heynnema avatar
ru flag
What flavor/version of Ubuntu are you running? Show me `sysctl vm.swappiness`.
Score:3
in flag

It would be helpful to have a sort of graph so I can see what was happening while I was working

Then use ``Stacer` downloadable from the ubuntu software center

enter image description here

enter image description here

Fabio Manniti avatar
ca flag
This helps. Thank you very much
pierrely avatar
cn flag
nice proggy, shows disk writes and reads too.
Score:1
ru flag

Your /swapfile is probably too small. Let's increase it from 2G to 4G...

Note: Depending on your usage pattern, you may need more RAM.

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 6G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.