discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Throttle question


From: Volker Schroer
Subject: Re: [Discuss-gnuradio] Throttle question
Date: Sun, 16 Mar 2014 18:10:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Thanks for the tips.

Setting the Max Output bufferin the throttle block did the trick.
Yes, the vector to stream block can be avoided. The default vector length is 1 in grc.

Now testing works much smoother.

Good to know.

-- Volker


Am 16.03.2014 18:00, schrieb Marcus Müller:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Volker,

yes, that is expected behaviour. Most probably ;)
For explanation: Since GNU Radio itself always passes around multiple
items at once (so your work doesn't get called), all throttle can do is
limit the average rate, unless it would consume one input item at a
time, stall work as long as necessary and then output that one item.
For higher sample rates (where the flow graph is nearly CPU-limited),
which is the original use case of throttle (stopping GNU Radio from
completely clogging the CPU) this would imply a considerable overhead.

What you can try is call the public
gr::block::set_max_noutput_items(int) method on your throttle block
*prior* to starting the flow graph. This should tell the scheduler to
call the throttle's work function with smaller numbers of input
samples (also, it reduces the output buffer size if that is feasible
for the downstream block).
Also, try smaller values for the max_output_buffer size of the vector
source, maybe (that could be even accessible in the GNU Radio
companion block property dialog).

one more question in that context: why the vector to stream? the
vector source can output single samples, too. Just set the vector
length to 1.

Greetings,
Marcus

On 16.03.2014 17:35, Volker Schroer wrote:
For testing purposes I use vector source (byte ) -> vector to
stream -> throttle -> [blocks to test] In the vector source
"repeat" is set to "yes" and the sample rate is set to 1024 ( and
in the throttle block , too ).

I would expect that the throttle delivers 1024 samples every
second. But I see that the throttle delivers 32768 bytes about
every 32 seconds. ( Which is on average 1024 samples per second ).
Is this the expected behavior or should the samples be delivered
every second ?

-- Volker


_______________________________________________ Discuss-gnuradio
mailing list address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTJdimAAoJEBQ6EdjyzlHtheAH/iv6UnTFsr0z+BftZO535iDu
kKZa4ik0wnYMv83byngbqX9RClzCATeTxSKgav9EwKIF66jAwH3l5Ojb+wv9SA4C
4gSttXCktHwCU7lcSPaAQMQzJIKOEJUlHPgd67iGxMVuu67RPDZoFyQiWSHaRaV1
kwhk4KgZs/Ku+ORvaMNJk3caTs9OUJkBvbqxvr1DCWZyHXS/CDh3is7XJMONcLRR
d0XzELkMic9MdbkT/ljnjujlPaMtlw+VM3SvU8Cfvm/lLif9KsLE0PdjF4yWbFpZ
Ct+RoD1/HZMUhceBZL804ty7xlNrt73B7jZgT9ZmgzxkEqoyw54UeoXnrIZeIjg=
=+VI7
-----END PGP SIGNATURE-----

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]