Skip to content
Advertisement

Tag: performance

What does “high involuntary context” switches mean?

I have re-written a part of code in C. When testing it with logging the resource usage using getrusage(2) C API. Before changing the code: After changing: I see a lot of involuntary context switches being done in the code I have re-written. My question is not about how to reduce context switches. But.. What happens when “involuntary context switches”

Bash while read loop extremely slow compared to cat, why?

A simple test script here: When I do cat my450klinefile.txt | myscript the CPU locks up at 100% and it can process about 1000 lines a second. About 5 minutes to process what cat my450klinefile.txt >/dev/null does in half a second. Is there a more efficient way to do essentially this. I just need to read a line from stdin,

Is there a way to improve performance of linux pipes?

I’m trying to pipe extremely high speed data from one application to another using 64-bit CentOS6. I have done the following benchmarks using dd to discover that the pipes are holding me back and not the algorithm in my program. My goal is to achieve somewhere around 1.5 GB/s. First, without pipes: Next, a pipe between two dd processes: Are

Advertisement