public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* read() syscall slowing down due to other threads?
@ 2012-05-01  6:03 George Porter
  2012-05-01  6:40 ` Nick Piggin
  2012-05-02 18:39 ` Chris Friesen
  0 siblings, 2 replies; 5+ messages in thread
From: George Porter @ 2012-05-01  6:03 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I've run into a weird phenomenon I was hoping someone could help me pin down.

I've got a multithreaded program which reads data off of 8 input
disks, and does some processing on it.  I have 8 Reader threads, each
of which reads data off of one of the eight input disks.  That data
gets passed to other threads, which do some processing (this is an 8
core machine).  If I do no or minimal processing in those other
threads, the read() calls go at the speed of the disks (~100 MBps).  I
measure that speed by taking a timestamp before the read syscall, then
afterwards, and dividing that into the read size (5MB).  All seems
good.

However, if I start doing more computation on those other threads, the
read() syscalls take longer to read the same amount of data,
eventually slowing down to 50 MBps (50% slower).  I've used
setaffinity() to isolate the Reader threads to one set of cores, and
the compute threads to a different set of cores, and so I don't think
it is CPU/scheduling interference.

Thoughts?  Has anyone run into this before?

Also, if you could CC me directly on any responses I would appreciate it.
Thanks, George

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-15 21:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-01  6:03 read() syscall slowing down due to other threads? George Porter
2012-05-01  6:40 ` Nick Piggin
2012-05-01 12:47   ` George Porter
2012-05-02 18:39 ` Chris Friesen
2012-05-15 21:08   ` George Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox