I have a C program who is reading from stdin. And i will test my program to 2GB of data with (4KB of read buffer) with dd command on linux.
I got 565MB/s on 3.20GHz machine. I got lesser in 300MHz machine. Is there any trick to maximize input speed. I have read some proc entry but can get any help. (is it something that i can maximize kernel io buffer size to increase speed?).
Please reply in brief asap.
Beginner in this field.
Increasing your read buffer (currently at 4K) will help speed things up. There is no other relevant tunable that can consistently help you. Reducing context-switches and larger batching of work should be your key method.