Page 1 of 1

Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 8. Jan 2012, 02:45
by zAchAry
At 4:40 Salix executes a few processes which are throttling the HDD I/O
It is not good for laptops with sensitive HDD.

The processes are: fc-cache idconfig gtk-icon-update housekeeping.

What was the reason to rush so fast with it? Make these processes to write in a rate of 10 or 20 KB per second instead of 10MB per second.
These few cron processes are running in the background and the user should not notice them.

I wanted to copy the name of the processes to mousepad and this is what happened at this critical time.
Image

I believe that these should read/write to disk in the lowest rate possible (Salix is also aimed to old machines after all)

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 13. Jan 2012, 17:58
by gapan
This comes from /etc/cron.daily/housekeeping, which is run once a day, not necessarily at 4:40AM. I'm not sure we still need it, maybe we'll remove it in the future. You can try deleting that file and see if any weird stuff appears with time concering fonts/icons.

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 13. Jan 2012, 19:17
by zAchAry
This is not the issue.
If you want to make services or tasks to run in the background every now and then, then you should make these to run seamlessly with no interruptions, even if it will take 10 minutes instead of 2 minutes.

Some will ask "What if the user will shutdown the system?" then do not replace the original files. duplicate the current files, update these files (seamlessly and slowly) and at the end of the process replace the files.

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 13. Jan 2012, 19:38
by Shador
No problems with performance nor character display here. You're welcome to suggest patches or to change it on your system. This doesn't seem crucial and therefor not worth the effort to me.
zAchAry wrote:duplicate the current files, update these files (seamlessly and slowly) and at the end of the process replace the files.
That would need to be implemented upstream.
zAchAry wrote:It is not good for laptops with sensitive HDD.
WTF!? What should be a sensitive HDD? They're meant to be written to and read from and the mechanical wear should be less than the one caused by keeping them running. For SSDs this might matter, but I'm quite sure that this is mostly reading anyway (repeatedly calling the script makes it run very fast --> previously read data is probably cached by the kernel now) so it matters even less for those. Apart from that laptop HDDs are actually more enduring and robust then desktop HDDs.
zAchAry wrote:I believe that these should read/write to disk in the lowest rate possible (Salix is also aimed to old machines after all)
How would you go about defining lowest rate possible? 1B/s? Well you could also do 1B/d or 1B/y? There's always a smaller value, so where effectively converging towards zero.
zAchAry wrote:If you want to make services or tasks to run in the background every now and then, then you should make these to run seamlessly with no interruptions, even if it will take 10 minutes instead of 2 minutes.
Now who's saying this? That's YOUR opinion.

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 16. Jan 2012, 16:55
by GJones
The real problem is that the Linux kernel gives priority to I/O hogs by default. Try putting this in your sysctl.conf:

Code: Select all

vm.dirty_bytes=524288
This severely limit the amount of data that a given application can write to the disk at one time (in this case to 512 KB). In my experience the impact on throughput is not huge (only a few MB/s) but the impact on responsiveness under load is enormous.

This is of course a crude hack, but it works very well on the desktop.

A better solution might involve writing a kernel I/O scheduler that can assign different priorities for known processes. OTOH, this is exactly what the Windows Vista I/O scheduler does, and I think we've all seen how Vista performs under load!

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 16. Jan 2012, 18:37
by Shador
GJones wrote: A better solution might involve writing a kernel I/O scheduler that can assign different priorities for known processes. OTOH, this is exactly what the Windows Vista I/O scheduler does, and I think we've all seen how Vista performs under load!
I'm fairly sure that among the schedulers already exisiting there is one that can do this. There are many alternatives like Completely Fair Queuing, Budget Fair Queueing, Anticipatory, Deadline, NOOP and probably many more. If support for the desired scheduler is available in the currently running kernel you can even change it on the fly through the /sys/block/sdX/queue/scheduler files for that specific disk.

Re: Horrible problem at 4:40AM with fc-cache idconfig...

Posted: 17. Jan 2012, 12:05
by thenktor
Shador wrote:
zAchAry wrote:It is not good for laptops with sensitive HDD.
WTF!? What should be a sensitive HDD? They're meant to be written to and read from and the mechanical wear should be less than the one caused by keeping them running. For SSDs this might matter, but I'm quite sure that this is mostly reading anyway (repeatedly calling the script makes it run very fast --> previously read data is probably cached by the kernel now) so it matters even less for those. Apart from that laptop HDDs are actually more enduring and robust then desktop HDDs.
+1 ;)