Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Linux caching of files, need more info on what affects it
jrfk2
post May 10 2006, 07:59 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 15-September 05
Member No.: 5,521



I understand that when I write files to a DVD, they are not necessarily written directly to the DVD but cached somewhere, and when I unmount the DVD then that will force the files to be actually written to the DVD. But I *believe* that sometimes Linux will write from the cache to the DVD before I do the unmount itself.

My problem is that I am sometimes writing very large zip files to the DVD and when Linux does decide to commit them to the DVD from cache, it seems that the i/o takes over much of the system to the detrement of other running processes.

So I am trying to find out as much as I can about how Linux caches the files and what affects how much it will want to cache and what affects when it will decide to flush the files from cache to the DVD (apart from unmount). For example does the mechanism care about how many files there are vs how large the files are.

I am hoping to find out if there is a way to tweak some Linux settings or change how/what files I write soas to better meter out getting the files written to DVD without Linux having to suddenly commit so much resource to the i/o to make that happen.

Appreciate any links, insights, etc others can share.

FWIW, I am using the UDF filesystem when I mount the DVD.
Go to the top of the page
 
+Quote Post
michaelk
post May 10 2006, 07:20 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



What distribution / version of linux are you running?
Are you using an application or basically dragging / dropping files into the DVD directory.
What type of DVD writer i.e. DVD-RAM, DVD+/-RW etc. Does this drive have hardware packet writing capabilities? Is this an InCD or DirectCD formatted disk?

Yes, linux caches disk writes and during idle times will actually write to the physical device. Umounting will force a buffer flush and write anything pending. I ask all of these questions because typically linux does not have drag / drop write capability to CDs or DVDs. I do not know what the latest is on packet writing capabilities with the latest kernels. cdrecord is typically the backend writer for many GUI apps like k3b. You can add the sync option when mounting to force writing.
Go to the top of the page
 
+Quote Post
jrfk2
post May 11 2006, 07:04 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 15-September 05
Member No.: 5,521



I am using Suse 2.4.20-4GB.
I am running a java app that is using buffered file i/o to read a file from the HD and writing it to the DVD. The DVD was formatted using mkudffs and mounted with the UDF fs.

The DVD drive itself it a DVD RAM/R and the media is a DVD-RAM Type II 4.7GB single sided.
I dunno about whether the drive supports packet writing.

I have also found that besides using unmount, I can use mount with the -o remount option which will remount the fs on the drive, forcing the buffer flush without having to actually unmount the drive.

Again, trying to find out if there is anything I can do programming wise or Linux OS setting wise to influence how much file caching is or isn't done, or if its completely out of my hands ..
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 13th December 2017 - 01:59 PM