User error. And truth is stranger than fiction as always... Unity8 was freezing every 5 seconds because that's the ext3/ext4 journal commit interval.
Unity8 was not doing the IO directly, but since it's being bypassed through USC, is very time-sensitive. Fullscreen bypass holds buffers back from the client for the duration of a frame. So the freeze was USC periodically failing to return Unity8 a buffer in time. The problem with USC as shown above was in its Mir compositor thread. I had configured it to use --compositor-report=log, which although it writes very little text, is subject to the ext3/ext4 journaling rules which force a commit/sync every 5 seconds by default. So the delay was USC's compositor thread writing to its log, which only once every 5 seconds is a slow operation. Whenever the hiccup occurred, that held back a bypass buffer from Unity8 a bit too long. To add to the problem, Mir's Mesa-KMS driver does not allow more than one frame to be pre-rendered so as to keep visual lag down. So it sometimes didn't have a fresh U8 frame ready in time and would skip a whole frame. There's no catch-up in the Mir Mesa-KMS driver, although I've coincidentally been thinking about implementing it. But doesn't matter; as soon as I turned off --compositor-report=log the bug was solved. ** Changed in: canonical-devices-system-image Status: Confirmed => Invalid ** Changed in: unity-system-compositor Status: Confirmed => Invalid ** Changed in: unity-system-compositor (Ubuntu) Status: Confirmed => Invalid ** Changed in: unity8 (Ubuntu) Status: Confirmed => Invalid ** Changed in: qtmir (Ubuntu) Status: Confirmed => Invalid ** Changed in: canonical-devices-system-image Milestone: u8c-1 => None -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1664150 Title: [performance] Unity8 rendering hiccups/stutters exactly every 5 seconds in unison with disk activity To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1664150/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs