﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
925	Severe degradation in threaded performance on Linux	Tristan Croll	tic20@…	"This seems to have happened at least a few months ago, but I've only recently had the time to start trying to diagnose it. The results are quite baffling, but I'm putting them out there in hopes that they might ring some bells.

In brief, ISOLDE's current design allows switching between multiprocessing (using os.fork, working on Linux only) and threading with a one-line change (swapping out multiprocessing.pool.Pool for multiprocessing.pool.ThreadPool). When I first switched over to threads the results were excellent - (very) slightly slower than multiprocessing, but still allowing graphics framerates on the order of 20-40 fps with simulations running. That's still true on my Macbook Air - for simulations of 2425 and 8346 residues (achieving approx. 5 and 2 coordinate updates/sec respectively) the graphics framerate averaged over 100 frames is about 50 fps. On my desktop (Xeon E5-2687W, GTX1080, CentOS 7) the 8346-atom simulation is now getting a paltry 3.4 fps, while on my laptop (i7-6700HQ, GTX1070, Fedora 24) it's around 8 fps.

The slowdown appears to be specifically associated with threading - if I switch the desktop over to multiprocessing the framerate immediately jumps to 17.1 fps. It also doesn't appear to be due to the simulation thread (the Python calls in there are minimal, and if I increase it from 20 to 500 simulation steps between updates of the ChimeraX coordinates the threaded framerate jumps to 44 fps). I've tried systematically removing all the callbacks I run on updating coordinates, and nothing seems to make a difference. So I'm somewhat at a loss. Any clues as to what might have changed?

To sum up: at present, the exact same code running on today's ChimeraX builds is getting ~15x better graphics performance on the MacBook Air than on heavy-duty Linux machines. Just weird."	defect	closed	moderate		Core		fixed						all	ChimeraX
