[SLE] how beagled is scheduled to run?
Hello. I have an X terminal server ... as perhaps everybody already knows because I keep asking stupid questions... Sometimes beagled and its related process (e.g. parse-metadata) suddenly come up and take everybody by surprise by taking 100% CPU resource and slowing everything down. This keeps 10 minutes and everybody decide to get a coffee. Usually every user's beagled process start together. I know how to shutdown beagled gracefully as it's easy to get this knowledge on google. What I didn't find on google is how to change scheduling of beagle and make sure beagled doesn't start in working hour. If beagled wish to index some files, it should do it in the evening, don't do it in working hour! Is it possible at all? First I thought beagle is started by cron, but I am not sure if I should remove beagle-crawl-system from cron.daily. I think perhaps beagled is started as a per-user process but cron is used to manage system process. Besides, removing beagle completely from cron is stupid, because beagle is useful, it simply decided to work in wrong time. Best approach: how about SuSE design it in this way? That "beagled only starts if load average in the past 10 minute is lower then 0.5 (configurable)". This gives beagled a smart brain, it can even start itself in launch time when noticed nobody used the desktop for a while. -- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
Hello. I have an X terminal server ... as perhaps everybody already knows because I keep asking stupid questions... Sometimes beagled and its related process (e.g. parse-metadata) suddenly come up and take everybody by surprise by taking 100% CPU resource and slowing everything down.
Desktop search has penalties. Just sort your files properly and you don't need it :)
This keeps 10 minutes and everybody decide to get a coffee. Usually every user's beagled process start together.
What I didn't find on google is how to change scheduling
`ionice` command and syscall.
Besides, removing beagle completely from cron is stupid, because beagle is useful, it simply decided to work in wrong time.
Given that it runs _a long time_ (even longer than updatedb), it may happen that it always runs at the wrong time.
Best approach: how about SuSE design it in this way? That "beagled only starts if load average in the past 10 minute is lower then 0.5 (configurable)". This gives beagled a smart brain, it can even start itself in launch time when noticed nobody used the desktop for a while.
As for me, beagle should only be run if the user explicitly allowed it. So much for starting beagle 15 minutes after the initial install just completed. Jan Engelhardt -- -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
在 2006-07-31一的 09:13 +0200,Jan Engelhardt写道:
Hello. I have an X terminal server ... as perhaps everybody already knows because I keep asking stupid questions... Sometimes beagled and its related process (e.g. parse-metadata) suddenly come up and take everybody by surprise by taking 100% CPU resource and slowing everything down.
Desktop search has penalties. Just sort your files properly and you don't need it :)
If I configure my Control Center to stop beagle from indexing my file, that is fine, but is there a way to remove it for all users? Emm, remove beagle package?
This keeps 10 minutes and everybody decide to get a coffee. Usually every user's beagled process start together.
What I didn't find on google is how to change scheduling
`ionice` command and syscall.
Ah, okay, admitted, I used wrong term, mislead by Windows' terminology "Task Scheduler" which is used like cron in Linux. For other newbies on this list: "scheduler" in linux is about how kernel give away CPU resource.
Besides, removing beagle completely from cron is stupid, because beagle is useful, it simply decided to work in wrong time.
Given that it runs _a long time_ (even longer than updatedb), it may happen that it always runs at the wrong time.
Best approach: how about SuSE design it in this way? That "beagled only starts if load average in the past 10 minute is lower then 0.5 (configurable)". This gives beagled a smart brain, it can even start itself in launch time when noticed nobody used the desktop for a while.
s/launch/lunch/
As for me, beagle should only be run if the user explicitly allowed it. So much for starting beagle 15 minutes after the initial install just completed.
Jan Engelhardt --
-- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
On Sunday 30 July 2006 23:29, 张韡武 wrote:
If I configure my Control Center to stop beagle from indexing my file, that is fine, but is there a way to remove it for all users? Emm, remove beagle package?
So, you answered you own question then! -- _____________________________________ John Andersen
Hi, On Monday 31 July 2006 00:29, 张韡武 wrote:
在 2006-07-31一的 09:13 +0200,Jan Engelhardt写道:
...
If I configure my Control Center to stop beagle from indexing my file, that is fine, but is there a way to remove it for all users? Emm, remove beagle package?
I cannot seem to find the Beagle controls in either the YaST Control Center or the KDE one. Where precisely are you configuring Beagle operations?
...
Randall Schulz -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
张韡武 wrote:
Hello. I have an X terminal server ... as perhaps everybody already knows because I keep asking stupid questions... Sometimes beagled and its related process (e.g. parse-metadata) suddenly come up and take everybody by surprise by taking 100% CPU resource and slowing everything down. This keeps 10 minutes and everybody decide to get a coffee. Usually every user's beagled process start together.
I know how to shutdown beagled gracefully as it's easy to get this knowledge on google. What I didn't find on google is how to change scheduling of beagle and make sure beagled doesn't start in working hour.
You need to reschedule the cron.daily jobs. If your system is running 24h, it's a good idea to move them to the night. See http://susewiki.org/index.php?title=Scheduling_daily_cron_jobs Use the first method, with at. The other methods on this page are garbage and should be removed completely. Changing the system time is ridiculous, and touch simply doesn't work, no need to try out. If I ever come around, I'll update that page... Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Mon, 2006-07-31 at 15:13 +0200, Joachim Schrod wrote:
You need to reschedule the cron.daily jobs. If your system is running 24h, it's a good idea to move them to the night.
See http://susewiki.org/index.php?title=Scheduling_daily_cron_jobs
Use the first method, with at.
The other methods on this page are garbage and should be removed completely. Changing the system time is ridiculous, and touch simply doesn't work, no need to try out. If I ever come around, I'll update that page...
Or maybe look at /etc/sysconfig/cron and change the time to something more suitable. # At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00" -- Dave Cotton <dcotton@linuxautrement.com> -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
在 2006-07-31一的 17:17 +0200,Dave Cotton写道:
On Mon, 2006-07-31 at 15:13 +0200, Joachim Schrod wrote:
You need to reschedule the cron.daily jobs. If your system is running 24h, it's a good idea to move them to the night.
See http://susewiki.org/index.php?title=Scheduling_daily_cron_jobs
Use the first method, with at.
The other methods on this page are garbage and should be removed completely. Changing the system time is ridiculous, and touch simply doesn't work, no need to try out. If I ever come around, I'll update that page...
Or maybe look at /etc/sysconfig/cron and change the time to something more suitable.
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
Oooops, if this works, then the article on susewiki really needs to be updated, it has to at least mention this method. I am trying your suggestion (but will only know the result tomorrow:)
-- Dave Cotton <dcotton@linuxautrement.com>
-- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
Hello. My original question is how to make beagled run when the system is free. We have a X terminal server, all users beagled process usually start to index the document all together, using up all system resource. Even worse, it does this in working hour. Thank you for every body who provided answer. Dave Cotton provided a very good solution that suits my case very well. He suggested to adjust /etc/sysconfig/cron, setting DAILY_TIME to non-working hour. The result is all daily scheduled task (including beagled) starts in lunch time, and my user no longer get disturbed in working hour. His solution is tested working on my system. 在 2006-08-01二的 09:31 +0800,张韡武写道:
在 2006-07-31一的 17:17 +0200,Dave Cotton写道:
On Mon, 2006-07-31 at 15:13 +0200, Joachim Schrod wrote:
You need to reschedule the cron.daily jobs. If your system is running 24h, it's a good idea to move them to the night.
See http://susewiki.org/index.php?title=Scheduling_daily_cron_jobs
Use the first method, with at.
The other methods on this page are garbage and should be removed completely. Changing the system time is ridiculous, and touch simply doesn't work, no need to try out. If I ever come around, I'll update that page...
Or maybe look at /etc/sysconfig/cron and change the time to something more suitable.
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
Oooops, if this works, then the article on susewiki really needs to be updated, it has to at least mention this method.
I am trying your suggestion (but will only know the result tomorrow:)
-- Dave Cotton <dcotton@linuxautrement.com>
-- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
Hi, On Monday 31 July 2006 18:31, 张韡武 wrote:
在 2006-07-31一的 17:17 +0200,Dave Cotton写道:
...
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
Oooops, if this works, then the article on susewiki really needs to be updated, it has to at least mention this method.
I am trying your suggestion (but will only know the result tomorrow:)
I can confirm that it does in fact work. Hurrah! Randall Schulz
Dave Cotton wrote:
On Mon, 2006-07-31 at 15:13 +0200, Joachim Schrod wrote:
You need to reschedule the cron.daily jobs. If your system is running 24h, it's a good idea to move them to the night.
See http://susewiki.org/index.php?title=Scheduling_daily_cron_jobs
Use the first method, with at.
The other methods on this page are garbage and should be removed completely. Changing the system time is ridiculous, and touch simply doesn't work, no need to try out. If I ever come around, I'll update that page...
Or maybe look at /etc/sysconfig/cron and change the time to something more suitable.
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
AFAIR, the OP asked for 10.0 -- this sysconfig variable is new in 10.1. puma:~ $ cat /etc/SuSE-release SUSE LINUX 10.0 (i586) VERSION = 10.0 puma:~ $ grep DAILY /etc/sysconfig/cron puma:~ $ grep DAILY /usr/lib/cron/run-crons puma:~ $ The better solution for 10.1 should be mentioned on the Wiki as well, however; I think we're in full agreement for that. Cheers, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany
Joachim, On Tuesday 01 August 2006 16:42, Joachim Schrod wrote:
Dave Cotton wrote:
...
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
AFAIR, the OP asked for 10.0 -- this sysconfig variable is new in 10.1.
puma:~ $ cat /etc/SuSE-release SUSE LINUX 10.0 (i586) VERSION = 10.0 puma:~ $ grep DAILY /etc/sysconfig/cron puma:~ $ grep DAILY /usr/lib/cron/run-crons puma:~ $
It may be newly documented in 10.1, but I tried in my 10.0 system, where there was no existing value in /etc/sysconfig/cron, and found that it _did_ control the execution time of the daily tasks. Most of them, anyway. RKHunter still ran at the less desirable time of 6:15 AM.
...
Cheers, Joachim
Randall Schulz
Randall R Schulz wrote:
On Tuesday 01 August 2006 16:42, Joachim Schrod wrote:
Dave Cotton wrote:
...
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
AFAIR, the OP asked for 10.0 -- this sysconfig variable is new in 10.1.
puma:~ $ cat /etc/SuSE-release SUSE LINUX 10.0 (i586) VERSION = 10.0 puma:~ $ grep DAILY /etc/sysconfig/cron puma:~ $ grep DAILY /usr/lib/cron/run-crons puma:~ $
It may be newly documented in 10.1, but I tried in my 10.0 system, where there was no existing value in /etc/sysconfig/cron, and found that it _did_ control the execution time of the daily tasks.
Are you sure? The respective lines from /usr/lib/cron/run-crons are: test -e $SPOOL/$BASE && { case $BASE in cron.hourly) TIME="-cmin +60 -or -cmin 60" ;; cron.daily) TIME="-cmin +1440 -or -cmin 1440" ;; cron.weekly) TIME="-cmin +10080 -or -cmin 10080" ;; cron.monthly) NOW=`date +%s` LASTMONTH=`date -d "last month" +%s` DIFF=`expr '(' $NOW - $LASTMONTH ')' / 86400` TIME="-ctime +$DIFF" ;; esac # remove all lock files for scripts that are due to run eval find $SPOOL/$BASE $TIME | \ xargs --no-run-if-empty rm } if test ! -e $SPOOL/$BASE ; then # accept this dir, if it isn't empty LIST=`find $CRONDIR ! -type d` if [ ! -z "$LIST" ] ; then RUN="${RUN} ${TIME_EXT}" fi fi As you can see, the flag file cron.daily is removed unconditionally if the ctime is longer than 1440 minutes ago. If the file doesn't exist any more afterwards, the interval ($TIME_EXT is hourly, daily, ...) is added to the list of directories to run (in $RUN). No variable like DAILY_TIME is involved in this computation. So, I'd like to ask for an explanation where $DAILY_TIME is involved in the run of cron.daily scripts, as I can't see it. Best, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany
Joachim, On Wednesday 02 August 2006 07:18, Joachim Schrod wrote:
Randall R Schulz wrote:
On Tuesday 01 August 2006 16:42, Joachim Schrod wrote:
Dave Cotton wrote:
...
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
AFAIR, the OP asked for 10.0 -- this sysconfig variable is new in 10.1.
puma:~ $ cat /etc/SuSE-release SUSE LINUX 10.0 (i586) VERSION = 10.0 puma:~ $ grep DAILY /etc/sysconfig/cron puma:~ $ grep DAILY /usr/lib/cron/run-crons puma:~ $
It may be newly documented in 10.1, but I tried in my 10.0 system, where there was no existing value in /etc/sysconfig/cron, and found that it _did_ control the execution time of the daily tasks.
Are you sure?
I'm sure that when I added that control parameter to my my /etc/sysconfig/cron file that the next two days (all that have passed, so far) the Beagle indexing has happened at 4:00 AM as I indicated.
...
Best, Joachim
Randall Schulz
Randall R Schulz wrote:
On Tuesday 01 August 2006 16:42, Joachim Schrod wrote:
Dave Cotton wrote:
...
# At which time cron.daily should start. Default is 15 minutes after booting # the system. Due the cron script runs only every 15 minutes, it will only # run on xx:00, xx:15, xx:30, xx:45, not at the accurate time you set. DAILY_TIME="04:00"
AFAIR, the OP asked for 10.0 -- this sysconfig variable is new in 10.1.
I'm sure that when I added that control parameter to my my /etc/sysconfig/cron file that the next two days (all that have passed, so far) the Beagle indexing has happened at 4:00 AM as I indicated.
This interested me, and I tried it out. While the variable may move the beagle indexing (I don't use beagle, so I didn't check that), it does definitively *not* move the cron.daily jobs on a fully patched 10.0 system: The day before yesterday, I changed cron.daily to run at 12:00. Then, yesterday, I added this variable to /etc/sysconfig/cron: puma:/etc/sysconfig # grep DAILY cron DAILY_TIME="04:15" puma:/etc/sysconfig # ll cron -rw-r--r-- 1 root root 2663 Aug 4 11:31 cron But, the cron job still runs at 12:00 and has not been rescheduled to 04:15: puma:/etc/sysconfig # ll /var/spool/cron/lastrun/ total 0 -rw-r--r-- 1 root root 0 Aug 4 12:00 cron.daily puma:/etc/sysconfig # date Sat Aug 5 10:21:25 CEST 2006 Therefore, this solution might work for beagle, but it is not a general cron.daily reschedule solution on 10.0 -- only on 10.1. Best, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany
On Mon, Jul 31, 2006 at 10:18:08AM +0800, 张韡武 wrote:
Hello. I have an X terminal server ... as perhaps everybody already knows because I keep asking stupid questions... Sometimes beagled and its related process (e.g. parse-metadata) suddenly come up and take everybody by surprise by taking 100% CPU resource and slowing everything down. This keeps 10 minutes and everybody decide to get a coffee. Usually every user's beagled process start together.
parse-metadata is part of ZMD/zypp however, not beagle. Ciao, Marcus
participants (7)
-
Dave Cotton
-
Jan Engelhardt
-
Joachim Schrod
-
John Andersen
-
Marcus Meissner
-
Randall R Schulz
-
张韡武