Sujet : Re: xxd -i vs DIY Was: C23 thoughts and opinions
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 02. Jun 2024, 12:40:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3hlnj$3b1d7$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla Thunderbird
On 02/06/2024 06:19, Lawrence D'Oliveiro wrote:
On Fri, 31 May 2024 09:55:49 +0200, David Brown wrote:
The only one I can think of is
"updatedb" for the "locate" command. While "locate" can sometimes be
useful, trawling the filesystem can be very time-consuming if it is
large. But it's easy to tune updatedb to cover only the bits you need.
On Linux, there is the concept of “ionice”, which is to I/O what “nice” is
to CPU usage. So for example if updatedb had its ionice dropped to “idle”
priority, that allows it to be pushed to the back of the queue when
regular apps need to do any I/O. Result is much less system impact from
such background update tasks.
Maybe there’s an option to set this somewhere?
Since the updatedb task is (IME at least) started from a cron job, it's not hard to use ionice with it if that helps. For many systems, updatedb is run in the middle of the night anyway, and is not a problem.
The worst trouble I've had with updatedb was on a file server that was used to hold archives - it was a small machine with little ram (but several big spinning rust disks), holding a great many files that were rarely accessed. It was mysteriously slow, until I discovered that every night it started an updatedb job that took so long to crawl through everything that it didn't always finish before the next run. ionice would not have helped at all - disabling updatedb was the answer. (Pruning the trees scanned by updatedb could also have helped, but I didn't need "locate" anyway.)
There are other situations where ionice can be helpful, however, and I have used it a few times (though I can't remember offhand when).