# File Sink Unbuffered

**URL:** <https://www.ruby-forum.com/t/file-sink-unbuffered/234708>\
**Category:** GNU Radio\
**Created:** [March 24, 2015, 1:28am UTC](https://www.ruby-forum.com/t/file-sink-unbuffered/234708 "2015-03-24T01:28:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [March 24, 2015, 1:28am UTC](https://www.ruby-forum.com/t/file-sink-unbuffered/234708/1 "2015-03-24T01:28:59Z")

</div>

I noticed a large difference in errors between input and output files  
when  
I turn unbuffered on and off.

With unbuffered on, there was no difference between my input and output  
file.

With unbuffered off, there were a lot of small errors that were  
introduced  
to the output file.

Is this a known issue, and should I always keep unbuffered on? gr3.7.6  
ubuntu 14.04

v/r,  
Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 24, 2015, 1:52am UTC](https://www.ruby-forum.com/t/file-sink-unbuffered/234708/2 "2015-03-24T01:52:46Z")

</div>

On 03/23/2015 08:27 PM, Richard B. wrote:

> ubuntu 14.04
> 
> v/r,  
> Rich
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)  
> If you unceremoniously terminate your flow-graph, there will be data in  
> ‘stdio’ buffers that have not yet been committed to the operating  
> system.

It may be the case, given Gnu Radio’s internal buffering mechanism, that  
using “unbuffered” all the time is the right thing to do, unless stdio  
buffers offer a performance advantage for an application (Gnu Radio,  
in this case) that already does alot of its own buffering.

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 24, 2015, 2:30am UTC](https://www.ruby-forum.com/t/file-sink-unbuffered/234708/3 "2015-03-24T02:30:04Z")

</div>

Thanks. I’m having trouble recreating the error so I think I want to  
take  
this back. I don’t see a difference anymore between buffered and  
unbuffered. I had multiple instances of gr open and running when I  
noticed  
the difference. Call it a fluke.

Rich
