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

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2045
Location: Germany

PostPosted: Wed May 27, 2015 5:07 pm    Post subject: Reply with quote

I had severe latency problems with disk io in the past. Crippling problems.

I tried EVERYTHING. Besides, IRQs were ok.

The solution: noop io-scheduler+zfs for rotating rust platters & noop io-scheduler+ssd
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2273
Location: Bardowick, Germany

PostPosted: Thu May 28, 2015 10:26 am    Post subject: Reply with quote

First, thank you for your suggestions, krinn!
krinn wrote:
Or maybe you are blaming the wrong thing?

While scheduler should switch to each task and give it an amount of time to work, if the scheduler is unable to switch, you can use whatever scheduler you wish, it won't switch.

Why it couldn't switch, if your hardware is busy and block interrupt, scheduler (the one you wish) must wait the hardware to stop doing that.
Fat chance if one scheduler is doing fine while the other hangs and hangs and hangs... *tehe* well, at least in my case it certainly was caused by ZFS not using bfq, so over all bfq mainly worked keeping up never doing any good. (Or something like that...)
krinn wrote:
What you should look at? Stuff like enabling MSI, use APIC instead of PIC, irq conflict for older hw (one using PIC only)...
Dell Precision M4800, one year old, utilizing MSI(-X), APIC and irqbalance is running.
krinn wrote:
If you have IRQ conflict and two devices try to work, one device may hide the other device request and worst may re-run the first one.
Say a mouse and hdd, when your hdd is writing and the mouse is moved, the mouse movement may get just ignore because every time the mouse move, the conflict might gives hand to the hdd again. Result: hdd is busy writing, mouse move, hdd is ask to continue while mouse is ignore. And user may see hdd doing its work, while mouse get no answer at all, in the mean time, poor scheduler is waiting the hdd to end before it can work.
Of course a mouse have no IRQ, but usb mouse are using the usb controller irq, and lame motherboard are used to shared usb controller with hdd controller.
You should also look at broken apic/pic option in kernel (CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS), and maybe using hpet that would gave a finer timer resolution and may help scheduler balancing.
Yes, of course, although then no scheduler would do just fine.

However:
Code:
 # grep REROUTE .config
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y

krinn wrote:
If you lack memory and the task was swap, there's nothing you can do, the hdd must read the swap to restore the memory because the scheduler is switching to it, in this case, i suppose if noop scheduler is doing less switching, then it would be the best to use.
Well, 32GiB Ram, 8x6GiB ZRAM Swap, 1x8GiB Swap partition. I can link qtwebkit:4, qtwebkit:5, firefox and libreoffice at the same time (build directory is on tmpfs) plus running a Windows 7 VM with 8 GiB RAM without even touching swap.
krinn wrote:
For your information, i just never had any problem like this using deadline scheduler, however i don't think the scheduler type makes any difference there (as long as memory is not an issue).
The deadline scheduler is the one that I never tried. Maybe I give it a shot.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2273
Location: Bardowick, Germany

PostPosted: Thu May 28, 2015 2:50 pm    Post subject: Reply with quote

So. I tried "noop", but it did not perform well under heavy disk load. Under normal load everything was as snappy as it can get.

Then I tried BFQ again but set the zfs scheduler to use bfq, too. And I guess I will keep this. My system is responsive in all situations I had, yet. (Including starting a windows 7 vm while copy syncs 3GB Data and two large directories getting synced with rsync.)

Wow!

I think this detail about echo'ing "bfq" to /sys/module/zfs/parameters/zfs_vdev_scheduler should be added to the ZFS Entry in the gentoo wiki, shouldn't it?
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
chaoscommander
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2012
Posts: 88

PostPosted: Sun Jun 23, 2019 9:00 am    Post subject: Reply with quote

haarp wrote:
Also, if you're using an SSD and ext4 wit hthe discard option, deleting lots of files can cause considerable delays as they get TRIMed from the disk.


I just returned here because the problem is still annoying me a lot. How did I miss this? Switching to cronjob fstrim, let's see!
Back to top
View user's profile Send private message
chaoscommander
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2012
Posts: 88

PostPosted: Fri Jun 28, 2019 6:01 pm    Post subject: Reply with quote

chaoscommander wrote:
haarp wrote:
Also, if you're using an SSD and ext4 wit hthe discard option, deleting lots of files can cause considerable delays as they get TRIMed from the disk.


I just returned here because the problem is still annoying me a lot. How did I miss this? Switching to cronjob fstrim, let's see!


That was the solution. Awesome!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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