Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Questions about specifications for some cutting edge videorecording via laptop
- Date: Tue, 13 Sep 2005 23:42:46 +0900
- From: bruno raoult <bruno@example.com>
- Subject: Re: [tlug] Questions about specifications for some cutting edge videorecording via laptop
- References: <43211F0A.8030000@example.com> <87oe72wtnz.fsf@example.com> <4321A9EF.5000105@example.com> <30ce843605091006136d3bd204@example.com> <4322DEF6.7070507@example.com> <30ce8436050910064057721ae2@example.com> <87d5neg1px.fsf@example.com> <30ce843605091203485add5600@example.com> <d8fcc08005091305533045b8e1@example.com>
- User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
Josh Glover wrote: > Yes, writes are buffered and written in a file-independent manner. The > write(3) syscall simply places the data to be written in the block > buffer, which the Linux kernel then writes to disk in an intelligent > fashion. So it should not matter how many files you are writing to, > the disk will still be used efficiently. Not exactly. write(2, sorry) syscall places the data to the block device, only if the opened file is a block device. On most Unix-like systems, you can access the same devices, but in a raw mode. Example: dd [...] of=my-raw-disk will not use at all the block device. The write(2) syscall sends a command to the underlying device (mainly block or raw). I would like to add that write(), even on a block device, could be highly inefficient. Just try to "write" one char at once 1,000,000 times. Try again with a library call (3) like putc() - that one will add one more layer of "caching". This is of course more visible with some kind of seeks in middle of the write... You just have to manage yourself the balance between security and speed, depending also on the way you need to write. You can do the same with memory only: Allocate (your memory * 2) with a malloc(3!). Then fill it with a double loop: 1 for (b=0; b<nb_blocks; b++) 2 for (c=0; c<b_size; c++) 3 *(b*b_size+c) = 0; Try this, Then invert lines 1 and 2, and compare the execution time. This is a problem with some developpers, as they don't understand the underlying layers... You can try this with b_size=4k for instance, and nb_blocks being your memory * 2 / b_size (assuming you have enough swap). In fact physical memory + 1 block will give the same result, probably. br. -- GPG Key: 653514E5 (http://www.raoult.com/gpg) -- Yoda: "No! Try Not! Do! Or Do not! There IS no try. Only Do." Yoda showed Luke what could be done. Luke: "I don't believe it..." Yoda: "That, is why you fail..."Attachment: signature.asc
Description: OpenPGP digital signature
- References:
- [tlug] Questions about specifications for some cutting edge video recording via laptop
- From: Dave Gutteridge
- Re: [tlug] Questions about specifications for some cutting edgevideo recording via laptop
- From: Stephen J. Turnbull
- Re: [tlug] Questions about specifications for some cutting edge videorecording via laptop
- From: Dave Gutteridge
- Re: [tlug] Questions about specifications for some cutting edge video recording via laptop
- From: Ian Wells
- Re: [tlug] Questions about specifications for some cutting edge videorecording via laptop
- From: Dave Gutteridge
- Re: [tlug] Questions about specifications for some cutting edge video recording via laptop
- From: Ian Wells
- Re: [tlug] Questions about specifications for some cutting edgevideo recording via laptop
- From: Stephen J. Turnbull
- Re: [tlug] Questions about specifications for some cutting edge video recording via laptop
- From: Ian Wells
- Re: [tlug] Questions about specifications for some cutting edge video recording via laptop
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] TLUG Shirt design details and proposal
- Next by Date: RE: [tlug-digest] [tlug] TLUG Shirt design details and proposal
- Previous by thread: Re: [tlug] Questions about specifications for some cutting edge video recording via laptop
- Next by thread: [tlug] Free computer hardware to give away.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links