LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-20-2012, 12:57 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
What if an http request arrives while I am authoring CD/DVDs. Can the burn go wrong?


Hi:
Scenario: I am running cdrecord in order to burn an iso image onto a disk. And in the middle of the session an LQ post arrives at my machine. Am I at risk of cdrecord failing?
 
Old 07-20-2012, 02:12 AM   #2
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
I cannot think why the burning of iso image will be afected by a LQ post. Can you think of any reason why this should be so?
 
Old 07-20-2012, 02:15 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Yes. Burning a disk is an uninterruptable process.
 
Old 07-20-2012, 08:55 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Use 'driveropts=burnfree' and nothing can interrupt the burn. In fact, the burn can stop completely and then resume without any problems.

Burning a DVD is different, because there is no burnfree, so I recommend using:
Code:
nice -n -5 growisofs -dvd-compat -speed=1 -use-the-force-luke=bufsize:32m -use-the-force-luke=notray -Z /dev/dvdrw="$1"
Where "$1" is an iso image.

Just for reference for CDs I use:

Code:
nice -n -5 cdrecord -v speed=1 driveropts=burnfree dev=/dev/cdrw -dao "$1"
 
2 members found this post helpful.
Old 07-20-2012, 08:44 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by H_TeXMeX_H View Post
Use 'driveropts=burnfree' and nothing can interrupt the burn. In fact, the burn can stop completely and then resume without any problems.

Burning a DVD is different, because there is no burnfree, so I recommend using:
Code:
nice -n -5 growisofs -dvd-compat -speed=1 -use-the-force-luke=bufsize:32m -use-the-force-luke=notray -Z /dev/dvdrw="$1"
Where "$1" is an iso image.

Just for reference for CDs I use:

Code:
nice -n -5 cdrecord -v speed=1 driveropts=burnfree dev=/dev/cdrw -dao "$1"
Thanks a lot, H_TeXMeX_H. Your refences to -use-the-force-luke specially useful! And now some questions:
(a) So speed=1 forces minimum speed, even if the medium is not a "no-name", does it?
(b) And about -use-the-force-luke=, I suppose I can't put cdrecord options on the right of the equal sign because growisofs does not use cdrecord. Is this so?
 
Old 07-21-2012, 01:37 AM   #6
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by stf92 View Post
Hi:
Scenario: I am running cdrecord in order to burn an iso image onto a disk. And in the middle of the session an LQ post arrives at my machine. Am I at risk of cdrecord failing?
not with any machine built in the last 15 years. A problem will only occur if the burn process is cpu starved long enough for the buffers to run empty. However, the cpu scheduler will share the cpu resource between user processes to prevent that from happening. On extremely slow hardware the situation may be helped by
  • giving the burn process higher scheduling priority or scheduling class
  • increasing buffer size
  • reducing burn speed
  • using a better cpu scheduler
 
1 members found this post helpful.
Old 07-21-2012, 02:44 AM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
That is very interesting. So the cpu scheduler is software! I suppose in old computers the cpu time slices were all equal in lenght. I once skimmed over the P6 family of Intel processors manuals and saw that that was a world. I can't imagine what it must be todday.

The first three items are controllable through cdrecord. And the slower the speed the better the recording. Wrong: for the first item I can use nice. (But then nice is a CPU scheduler!)
 
Old 07-21-2012, 03:21 AM   #8
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by stf92 View Post
That is very interesting. So the cpu scheduler is software!
It most certainly is. It's part of the kernel (and at times at the centre of a heated debate).


Quote:
I suppose in old computers the cpu time slices were all equal in lenght.
It has always been more sophisticated. There used to be a regular timer interrupt that was used by the cpu scheduler to pre-empt processes that hadn't yielded the cpu voluntarily, but there is any number of reasons why the running process might have been re-scheduled in between.

Quote:
Originally Posted by stf92 View Post
(But then nice is a CPU scheduler!)
nice only sets a process parameter. The cpu scheduler is in the kernel. Btw, you can use other tools for more dramatic effect, like changing scheduling class (sometimes referred to as scheduling policy), particularly in conjunction with a more effective cpu scheduler (like rt or bfs).

http://rpm.pbone.net/index.php3/stat...azwa/schedtool
http://ck-hack.blogspot.de/2012/07/b...ux-34-ck3.html

This is just for info, not required for burning CDs.
 
1 members found this post helpful.
Old 07-21-2012, 03:38 AM   #9
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks for more intersting facts and for the links, reading which, I saw:

To execute mplayer in SCHED_RR with priority 20. The priority arg is neededfor both SCHED_RR and SCHED_FIFO.

I've always wondered why I can't make mplayer play an audio disc (CDDA) in a descent way. No matter what mplayer package, no matter what CD, the buffer seems at times to empty, even if I augment the cache size. But reading the quote above, I think something could be done in a more radical o basic way! However, playing with the scheduler is something I, right now, wouldn't dare to do. May be by a combined reading of the man page and careful study of the subject I could make mplayer "behave himself" sooner than I expect!

Also, mplayer is too big a program for my machine. But it plays movies prity well. Unbelievably it is CDDA what it has trouble with.

Last edited by stf92; 07-21-2012 at 03:41 AM.
 
Old 07-21-2012, 04:00 AM   #10
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by stf92 View Post
Unbelievably it is CDDA what it has trouble with.
indeed. there must be something wrong with mplayer.
 
Old 07-21-2012, 04:27 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by stf92 View Post
Thanks a lot, H_TeXMeX_H. Your refences to -use-the-force-luke specially useful! And now some questions:
(a) So speed=1 forces minimum speed, even if the medium is not a "no-name", does it?
(b) And about -use-the-force-luke=, I suppose I can't put cdrecord options on the right of the equal sign because growisofs does not use cdrecord. Is this so?
It uses the lowest speed the drive can do, it doesn't matter about the medium.

growisofs is the only one with -use-the-force-luke options and it is completely different from cdrecord. You can technically also burn DVDs with cdrecord, but I prefer growisofs. Both programs can use mkisofs, but I recommend making the ISO beforehand so there is less chance of something taking too long and leading to buffer underflow.
 
1 members found this post helpful.
Old 07-21-2012, 06:06 AM   #12
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by H_TeXMeX_H View Post
I recommend making the ISO beforehand so there is less chance of something taking too long and leading to buffer underflow.
good point. With my previous comment I had this scenario in mind. When creating the iso file on the fly we open up to additional points of failure. In this scenario an I/O-heavy process can indeed interfere with CD burning. However, processing http requests shouldn't be of this nature.
 
Old 07-21-2012, 08:45 AM   #13
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by Martinus2u View Post
good point. With my previous comment I had this scenario in mind. When creating the iso file on the fly we open up to additional points of failure. In this scenario an I/O-heavy process can indeed interfere with CD burning. However, processing http requests shouldn't be of this nature.
In theory http requests shouldn't matter for this, only heavy disk I/O on the same disk will make a difference. With burning CDs and burnfree on, nothing should affect the burning process.
 
Old 07-21-2012, 11:54 AM   #14
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I want to ask a related question, so I'll use this thread. With one of my optical disk burners, a Philips SPD2417T, not exactly a high-end product, I'm getting

WARNING: Drive returns wrong startsec (0) using -150
Writing pregap for track 1 at -150

every time I use cdrecord on it. Would this be a serious failure?
 
Old 07-21-2012, 12:19 PM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by stf92 View Post
I want to ask a related question, so I'll use this thread. With one of my optical disk burners, a Philips SPD2417T, not exactly a high-end product, I'm getting

WARNING: Drive returns wrong startsec (0) using -150
Writing pregap for track 1 at -150

every time I use cdrecord on it. Would this be a serious failure?
No, it's normal. I get that for all my drives. I think it is just cdrecord being excessively strict.
 
  


Reply



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
Cannot burn DVDs Pernod Jim Linux - Newbie 2 11-22-2007 08:26 AM
Cannot burn DVDs Pernod Jim LinuxQuestions.org Member Intro 0 11-20-2007 08:11 AM
Can't Burn DVDs with K3b anwar Slackware 15 04-28-2007 11:59 AM
k3b won't burn CD-R's but does burn DVDs. Livino Linux - Newbie 6 03-18-2006 05:51 PM
burn dvds eduac Linux - Software 6 06-23-2005 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration