Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Disk I/O freezes system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Mimamau
Apprentice
Apprentice


Joined: 11 Jun 2002
Posts: 160
Location: Germany

PostPosted: Thu Feb 15, 2018 2:22 pm    Post subject: Disk I/O freezes system Reply with quote

When building larger packets, my system freezes with a solid hard disk LED.
I tried using less threads, disabling swap, switching cfq / deadline io scheduler.

My system is a Core i7 2,8Ghz with 4GB RAM. How can I prevent this?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3357
Location: Rasi, Finland

PostPosted: Thu Feb 15, 2018 3:34 pm    Post subject: Reply with quote

I guess you have set --jobs=1. And jobs for emake (-j<number>) in MAKEOPTS too?

-pipe in CFLAGS reduces disk activity if you have enough ram, otherwise it starts poking your swap.

With 4GB I don't recommend to place portage temp on tmpfs. Check that too.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Mimamau
Apprentice
Apprentice


Joined: 11 Jun 2002
Posts: 160
Location: Germany

PostPosted: Thu Feb 15, 2018 4:20 pm    Post subject: Reply with quote

I have MAKEOPTS="-j5" and PORTAGE_TMPDIR="/var/tmp".
Never had problems with -pipe, will try it without.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3357
Location: Rasi, Finland

PostPosted: Thu Feb 15, 2018 4:28 pm    Post subject: Reply with quote

What's the filesystem on your /var/tmp? Check that there's anough space. Some filesystems tend to perform poorly if over 85-90% is being used.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Feb 15, 2018 7:42 pm    Post subject: Reply with quote

Do you have a SSD? Did you forget to use fstrim?
Back to top
View user's profile Send private message
Mimamau
Apprentice
Apprentice


Joined: 11 Jun 2002
Posts: 160
Location: Germany

PostPosted: Thu Feb 15, 2018 9:30 pm    Post subject: Reply with quote

No SSD, /var/tmp is on the root partition with enough free space, it's a fresh installation.
To rule out a broken disk, I moved the hole system to another disk with the same results.
I have a terminal window with top open, as soon as kswapd(0) becomes visible (5.8% CPU), the system freezes or becomes completely unresponsive.
Top says, swap is not used at all.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3357
Location: Rasi, Finland

PostPosted: Thu Feb 15, 2018 10:02 pm    Post subject: Reply with quote

Mimamau wrote:
as soon as kswapd(0) becomes visible (5.8% CPU), the system freezes or becomes completely unresponsive.
That's very strange. Only thing, I know, uses kswapd, other than swap itself, is zswap but that does not cause disk i/o.

Make absolutely sure you don't have any swap enabled by:
Code:
cat /proc/swaps


Everything seems to suggest that you have ran out or memory... and kernel is constantly moving memory pages in and out of swap space.

Does this happen right after you ran out of memory?
Does dmesg show anything strange when this happens? dmesg -w on terminal then start running something that causes this problem.

Do you use systemd btw?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Mimamau
Apprentice
Apprentice


Joined: 11 Jun 2002
Posts: 160
Location: Germany

PostPosted: Fri Feb 16, 2018 5:02 pm    Post subject: Reply with quote

Nothing in dmesg. Yes, it happens right when its out of memory.
I do not use systemd.

I found something. I booted from the livecd and chrooted into my system and it did not happen.
This time the system actually used the swap. It became slower but not unresponsive.

Now I noticed, the livecd set swappiness to 60, while my system defaults to 0.
So I set it to 60 and compile on... :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum