Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Ugly wrap-around to avoid high CPU and I/O on update-apt-xapian-index
I've read somewhere that someone else was also annoyed by this.
Here's what I did:
That's my "/usr/sbin/update-apt-xapian-index", which is called by synaptic and whatever else. The ".py" file is the original script.
It still makes the CPU fan audibly accelerate, but it's no longer frightening.
It's probably totally against Debian's policies and recommendations, though. It will most likely be just erased when the original script is updated, but perhaps the update may complain of something wrong. And, if nothing happens, of course, with no warning, the original high CPU and I/O will be back. Perhaps the "ideal" is to have some sort of daemon that renices the script and cpulimits it, when it's run.
Here's what I did:
Code:
#!/bin/sh cpulimit -l 5 -e updatep-apt-xapian-index.py & ionice -c 3 /usr/sbin/update-apt-xapian-index.py $@
It still makes the CPU fan audibly accelerate, but it's no longer frightening.
It's probably totally against Debian's policies and recommendations, though. It will most likely be just erased when the original script is updated, but perhaps the update may complain of something wrong. And, if nothing happens, of course, with no warning, the original high CPU and I/O will be back. Perhaps the "ideal" is to have some sort of daemon that renices the script and cpulimits it, when it's run.
Total Comments 0