Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fsync writes very slow
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
Reiner Lange
n00b
n00b


Joined: 08 Aug 2018
Posts: 2

PostPosted: Wed Aug 08, 2018 8:52 am    Post subject: fsync writes very slow Reply with quote

I have the following general setup:

Disklayout:
Two HDDs.
One SSD.

Three Physical LLVM Volumes. One for each Disk.
Most stuff is on the HDDs inside LLVM Volumes.
Each mountpoint uses btrfs as raid1 over two LLVM Volumes, located on booth HDDs.

For fast dataaccess, I have btrfs still as raid1 over two LLVM Volumes, but located on the SSD (raid1 is used to protect against data corruption, not disk failure)
Some LLVM Volumes are encrypted with luks.

LXC:
A genkernel with everything enabled for lxc.
Multiple LCX Instances one of which is the Desktop. The root instance does only contain stuff to manage lxc and disks.

The Problem:
Everything which uses disk access especially with fsync is very very slow.
Emerging large packages freezes the system during unpack.
Disk IO stops blocks all other IO even when the Desktop does not freeze. (Network Streams, Audio Output)

A postgres DB restore can take hours with fsync on and minutes with fsync turned off in postgres itself.

I am not sure what the problem source could be. My Ideas revolve around:
* Is it LXC in general?
* Did I miss something in the kernel config?
* Is my disk setup to slow?

I am usure how to diagnose this. [Edit]What would you suggest I try to figure out the cause of the problem?[/Edit]


Last edited by Reiner Lange on Wed Aug 08, 2018 9:29 am; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Aug 08, 2018 9:27 am    Post subject: Re: fsync writes very slow Reply with quote

Reiner Lange wrote:
I am usure how to diagnose this. What would you suggest I try?

Reiner Lange ... I'd probably look first at the IOSCHED/DEFAULT_IOSCHED in use, and test with another. You might also try PORTAGE_IONICE_COMMAND, eg:

/etc/portage/make.conf:
PORTAGE_IONICE_COMMAND="ionice -c 3 schedtool -D \${PID}"

Code:
% for i (ionice schedtool) equery belongs -e =$i
 * Searching for /usr/bin/ionice ...
sys-apps/util-linux-2.30.2-r1 (/usr/bin/ionice)
 * Searching for /usr/bin/schedtool ...
sys-process/schedtool-1.3.0-r1 (/usr/bin/schedtool)

HTH & best ... khay
Back to top
View user's profile Send private message
Reiner Lange
n00b
n00b


Joined: 08 Aug 2018
Posts: 2

PostPosted: Tue Sep 04, 2018 11:30 am    Post subject: Reply with quote

It appears that part of the Problem was, that my default Scheduler was CFQ, where the Deadline Scheduler was what I needed to use.

While playing with ionice I realized, that those schedulers have very different properties and some are better suited for a Desktop Environment.

I still have to test if the slow fsyncs are caused by that as well. From my understanding of what these schedulers do it should be unoticably worse now, but not better.
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