LabVIEW DISCUSSION

How large should a LabVIEW logging queue be when disk writes occasionally stall?

Started by amine LabVIEW queuesproducer consumerDAQ loggingbuffer sizingdata loss
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

How large should a LabVIEW logging queue be when disk writes occasionally stall?

amine LabVIEW Forum
#1

For continuous data acquisition, how can the acquisition loop remain independent of file-write delays? Suppose data arrive at 10,000 samples per second and each stored record contains 16 bytes including its metadata.

If the disk writer can stall for two seconds, what queue capacity is needed, and what should happen when the buffer still fills?

Community replies 3

Re: How large should a LabVIEW logging queue be when disk writes occasionally stall?

#2

The incoming rate is 160,000 bytes per second, so two seconds require at least 320,000 bytes of payload buffering. Add overhead and margin, and consider whether records are queued individually or in blocks. This estimate assumes the consumer can later drain the backlog. If its sustained throughput is below the acquisition rate, no finite queue prevents eventual overflow.

Re: How large should a LabVIEW logging queue be when disk writes occasionally stall?

#3

Use separate acquisition and logging work, connected by a bounded queue or another suitable buffering mechanism. Record queue depth and the number of dropped or rejected records. Decide explicitly whether overflow stops the test, drops the oldest data or drops new data; the appropriate policy depends on the measurement. Silent loss makes a continuous-looking plot misleading.

Re: How large should a LabVIEW logging queue be when disk writes occasionally stall?

#4

Test startup, shutdown and writer failure as carefully as steady operation. A normal stop may need to drain the queue before closing the file, while an error path must avoid waiting forever. Save timestamps or sequence numbers so gaps can be detected afterward. Include the DAQ device's own buffering in the analysis, since the application queue is only one stage of the data path.

TEP COMMUNITY