Bug 216794
Summary: | growisofs buffer size ridiculously small, disregard bufsize option | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Juliano F. Ravasi <bugs+fedora> | ||||
Component: | dvd+rw-tools | Assignee: | Harald Hoyer <harald> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2007-01-15 12:29:00 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Juliano F. Ravasi
2006-11-22 00:43:05 UTC
I went to investigate the bug by looking into the source. It seems to be a bug introduced on dvd+rw-tools version 7.0. The changelog for growisofs.c states: * 7.0: * - limit ring buffer size to 1/4 of RAM; But it doesn't match for me, since I have 1GB of RAM and sometimes growisofs allocates only 1MB of buffer size. So I went down to where this is limited and found this (growisofs.c:3100): size_t phys_mem = (size_t)sysconf(_SC_AVPHYS_PAGES) * (size_t)sysconf(_SC_PAGESIZE); if (phys_mem) { phys_mem /= 2; /* normally AVPHYS is a bit smaller, so * we commonly land on 1/4 RAM */ while (the_buffer_size > phys_mem) the_buffer_size /= 2; } This is pretty clear the problem. _SC_AVPHYS_PAGES returns the number of available, really free memory pages, not the total number of memory pages. Linux tends to use all available memory with buffers and cache, and keep just a bare minimum of free pages during normal use. So, this code cuts the size of the buffer in half again and again until it is less or equal to half the size of free memory. Right now free informs me that I have 7MB of really free memory, but 594MB of "available" memory (discounting space used by buffers and cache), out of a total of 940MB (1GB physical). So, if I started burning a DVD right now, it would give me 2MB of buffer, that is the biggest power of 2 smaller than 3.5MB, that is half of 7MB. Created attachment 141860 [details]
Patch to fix this problem
This fixes the problem for me.
I'll ask dvd+rw-tools' maintainer (Andy Polyakov) to take a look here.
Andy Polyakov doesn't answer my e-mails.
Could this bug be fixed by Fedora? The patch is in the attachment 141860 [details].
dvd+rw-tools-7.0-0.fc6.3 should appear soon in the testing repo Harald: tested dvd+rw-tools-7.0-0.fc6.4 from updates-testing and it worked! Thanks! I don't have RHEL5, so I can't test the last one. |