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”
Tag: performance
Fastest technique to pass messages between processes on Linux?
What is the fastest technology to send messages between C++ application processes, on Linux? I am vaguely aware that the following techniques are on the table: TCP UDP Sockets Pipes Named pipes Memory-mapped files are there any more ways and what is the fastest? Answer I would suggest looking at this also: How to use shared memory with Linux in
iozone what is record size/record lengh?
We have build windows file server and i wan to run iozone to test Disk I/O performance so what kind of test i should run and how do i know how much i/o i will get at X size of file? also what is record size or record lengh I came across many time this word while i was googling..
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
OpenGL full screen texture brings framerate down to 12fps
I installed linux (Debian) on an old laptop and have been writing an OpenGL application with it. The framerate cruises at about 80fps when drawing a texture on a small portion of the screen. When I draw the texture on a bigger and bigger portion of the screen, the framerate drastically drops. A full-screen texture drops the fps to 12.
Looking for an accurate way to micro benchmark small code paths written in C++ and running on Linux/OSX
I’m looking to do some very basic micro benchmarking of small code paths, such as tight loops, that I’ve written in C++. I’m running on Linux and OSX, and using GCC. What facilities are there for sub millisecond accuracy? I am thinking a simple test of running the code path many times (several tens of millions?) will give me enough
200,000 images in single folder in linux, performance issue or not?
I have a php/mysql website with over 200,000 images in single folder (linux server). I don’t think, that I will never need to see them in file explorer, instead they will be viewed on website on their individual pages. They are just displayed in product page on website. File system is ext3. so is it wise to save them in
Why does my code run slower with multiple threads than with a single thread when it is compiled for profiling (-pg)?
I’m writing a ray tracer. Recently, I added threading to the program to exploit the additional cores on my i5 Quad Core. In a weird turn of events the debug version of the application is now running slower, but the optimized build is running faster than before I added threading. I’m passing the “-g -pg” flags to gcc for the