LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-13-2011, 02:54 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,149

Rep: Reputation: 46
Updatedb has no regard for cdrecord.


Kernel 2.6.21.5, Slackware 12.0
Cdrecord-ProDVD-Clone 2.01.01a23 (i686-pc-linux-gnu)
Secure Locate 3.1 - Released March 7, 2006

Hi:
I was in the middle of recording a CD with audio data, with cdrecord, when updatedb began to run. In itself not a surprise, because it is invoked in one of the cron directories. It is scheduled to run at about 04.40 local time. But it could have ruined the recording. Has not linux a sense of priorities? Or is it expected that I give cdrecord a high priority before running it?
 
Old 09-13-2011, 04:14 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,516

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
updatedb is run with a nice value of 19 (see /etc/cron.daily/slocate), which is the lowest priority possible. Read the results of...
Code:
info coreutils 'nice invocation'
...for a discussion of the range of "nice" values. Also look at the Wikipedia article on "nice". You could make a case that slocate should also be run with an ionice level of Idle to ensure that it doesn't mess with CD burning; see the results of
Code:
info ionice
 
1 members found this post helpful.
Old 09-13-2011, 04:28 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,351

Rep: Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041
I would make a case for not running updatedb at all via cron, most especially on a home PC.
I run it when I feel the need - which isn't often.

mlocate is a *lot* less intrusive than slocate - has been available for years.
 
Old 09-13-2011, 06:00 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,149

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by Richard Cranium View Post
updatedb is run with a nice value of 19 (see /etc/cron.daily/slocate), which is the lowest priority possible. Read the results of...
Code:
info coreutils 'nice invocation'
...for a discussion of the range of "nice" values. Also look at the Wikipedia article on "nice". You could make a case that slocate should also be run with an ionice level of Idle to ensure that it doesn't mess with CD burning; see the results of
Code:
info ionice
Thanks for your post.
Code:
semoi@darkstar:~/bin$ cat /etc/cron.daily/slocate 
#!/bin/sh
/usr/bin/updatedb -c /etc/updatedb.conf
semoi@darkstar:~/bin$
That line only gives updatedb the conf file path. I do not know who put it there, the installer or I. In any case, it's easy to remedy.

About ionice, I issued 'ionice' and it made something. It's in the utils-linux package. But neither man nice mentions it, nor it has its own man or info page. Not even help. Regards.
 
Old 09-13-2011, 10:51 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,516

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
Quote:
Originally Posted by stf92 View Post
Thanks for your post.
Code:
semoi@darkstar:~/bin$ cat /etc/cron.daily/slocate 
#!/bin/sh
/usr/bin/updatedb -c /etc/updatedb.conf
semoi@darkstar:~/bin$
That line only gives updatedb the conf file path. I do not know who put it there, the installer or I. In any case, it's easy to remedy.

About ionice, I issued 'ionice' and it made something. It's in the utils-linux package. But neither man nice mentions it, nor it has its own man or info page. Not even help. Regards.
Oops! My bad. I'm running 13.37, so I guess that is a relatively recent addition. I don't have any versions of Slackware available than 13.1.

As it so happens, Slackware 13.1 has...
Code:
#!/bin/sh
ionice -c3 nice -n 19 /usr/bin/updatedb -c /etc/updatedb.conf
...in /etc/cron.daily/slocate, which makes the updatedb run "nicer" in terms of CPU and I/O. Alas, I don't remember if 12.2 had this or not.

Maybe you should upgrade.

Last edited by Richard Cranium; 09-13-2011 at 10:54 PM. Reason: I'm an incoherent dork.
 
Old 09-13-2011, 11:54 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,149

Original Poster
Rep: Reputation: 46
Do not worry. I ran the command directly from the cli prompt and the syntax was accepted. But I'm doubting about having it run automatically because the CD I was authoring now hangs mplayer. I is played OK by a stand-alone player and by certain other software player, but mplayer freezes and only I can get the prompt back using ^C. There is a proverb that says In case of doubt do not do it. I think I'll apply it. Thanks for the post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND question in regard to caching raevin Linux - Server 1 09-04-2011 10:27 AM
Considerations with regard to incompetence Dogs General 6 04-28-2010 10:57 AM
updatedb crashes: src/updatedb.c:730: scan_cwd: Assertion `name_size > 1' failed sumanc Fedora 3 07-11-2008 04:39 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
cd recorder problem with regard to mounting ShamitSoneji Fedora 2 11-16-2004 04:05 AM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration