Glitch Free Book (Seeking Feedback)

On page 22: “Scroll through the Advanced Power Settings and locate the settings for ȊMinimum Processor Stateȋ and ȊMaximum Processor Stateȋ and make sure both are set to 100% - which basically means not to use any of these power saving mechanisms and to keep the CPU up and running ready to go.If you’re running any modern PC and these options are missing, you might want to check with whoever setup or installed Windows on your computer and find out why. This setting really should be available and reviewed.”

At Bitsum’s “ParkControl” page, he says many manufacturers hide these settings, and he offers a manual way of doing this using powercfg commands, a registry fix (clickable and manual), and a piece of software that makes these manageable via the power options control panel again. See: https://bitsum.com/parkcontrol/ towards the bottom.

EDIT: I see you address this on pages 36-38. And a re-read of Bitsums page shows he is not talking about min and max processor states being hidden - only CPU core parking. So… nevermind! BTW - Core parking is only applicable to I7 CPU’s, right? AMD CPU’s don’t do that, do they?

Page 31 - The “Computer” title has been changed to “This PC” in Windows 10.

Another odd word-wrapping on a contraction on page 57: "You don’t want your software spending time processing the receipt of these events, nor the time required to generate them if they’
re not needed. "

Typo page 58 “you” instead of “your”: "This presents a complicated situation. Imagine for example you have two plugins that both support multi-core processing and you host program "

Finished it - great book! Really top-shelf! :smile:

Two questions - I have an Intel chip - an i7 4790 - and the BIOS has “SpeedStep Technology”. Should I turn that off entirely there. or just use the Min/Max settings? This relates to Processor Power Management (p22). My Power Options does not show settings for Min/Max that if I turn SpeedStep off in the BIOS.

I also have the ability to turn off hyper-threading in the BIOS. Turn that off as well? You only say, “Using hyper-threading for real-time audio processing can result in a significant loss of performance. My advice here is if your audio software allows selecting the number of threads to be used for audio processing do not exceed the number physical processor cores.” (p59) How about turning it off altogether? Or both?

(Others having these options may wonder the same things, so they likely should be addressed directly.)

P.S. - Curiously, my system BIOS actually allows me to turn multi-core off, which surprised me. Since as you say a single-core system can run more efficiently (p57), I cannot help but wonder if that is why they included that option!

Terry

The waiting is happening at different levels. In the example in the book, “different parts of the program can run without having to wait for each other” means that the code that receives keyboard input doesn’t have to wait for the spellchecker to finish before it can read another keypress (which would make typing horrible!). The two things appear to be running at the same time, which is precisely what you would want. However the time-slicing means that at a microscopic level, the different threads (eg handling the keyboard and spellchecking) are being switched in and out at high speed (maybe 100 times/second - I believe it varies enormously based on what your machine is doing), each taking it in turns to execute a little bit, before being interrupted by the operating system and another one taking over. So at that level, each thread is waiting, but only ever for a matter of milliseconds (usually), and it’s not (usually) noticeable to the user.

An analogy would be reading two books. In a multi-threaded world you could read a page of one book, then a page of the other book, then a page of the first etc, essentially reading them both “at the same time”. In a single-threaded world, you’d start one book, but couldn’t start the second (or in fact do anything else) until you’ve read the first to the end.

As an aside, on modern computers with multiple CPUs/cores, multiple threads are actually doing stuff simultaneously, distributed across those cores. But the operating system still has to do lots of this thread switching, as you generally have far more threads running than you have CPU cores.

Neil

1 Like

Could I just throw in a rather British “under the bonnet” ? That’s what we call the hood of a car over here. Oh dear, I think bonnet might have dampened Terry’s mood… :smile:

Neil

1 Like

Brad,

I have two questions. Page 34 talks about making changes to the “Attribute” DWORD. Step 6… Repeat steps 3-5… (there may be several.)

Are you talking about all the keys directly under key 54533251-82be-4824-96c1-47b60b740d00 (which is where key 0cc5b647-c1df-4637-891a-dec35c318583 resides)

I have 35 there.

I made the change to the key you reference, and the change showed up as you specified, so I’m wondering why all of the others.

Secondly, I currently use a VBScript to turn the following services on and off:

BITS - Background Intelligent Transfer
dbupdate - DropBox Update Service
CscService - Offline Files
Spooler - Print Spooler
wuauserv - Windows Update
WSearch - Windows Search
WMPNetworkSvc - Windows Media Player Network Sharing
Sysmain - SuperFetch

Plus

AdobeARMservice - Adobe Acrobat Update Service
gupdate - Google Update Service

The thought was to shut those off while I’m out gigging, but be able to turn them back on at home where performance isn’t an issue.

What are your feelings on that?

Thanks again!

Rick

1 Like

Thanks for your feedback everyone, glad this is being well received. I’ll work through all the comments and make some changes/improvements.

Some comments:

Neil’s reply pretty much answers this but I’ll review that section and see if I can make it clearer.

I’ll check these but probably moot - the whole book’s been converted to markdown now and will be built using pandoc to pdf, mobi and epub. It might just be a rendering issue with dropbox docx viewer.

I’m not sure where I picked up this term, but to me it’s always just meant “in secret”. Perhaps and Aussie thing. (and like the Brits, in Australia we use “bonnet” rather than “hood” too).

I’d leave that on - then you can switch back from the “Maximum Performance” power scheme and get your power saving back again more easily.

Leave it on in the BIOS. The idea here is to simply not deliberately overload the cores when processing audio by having more high priority threads than physical cores. (That said, I’ve never really tried but also never heard of anyone having issues leaving it on in BIOS)

Leave it on. Single threaded runs more efficiently in that there doesn’t need to be any synchronization of access across multiple threads. So for say a single plugin, single threaded might be better, but for a anything more complex everything will be a little less efficient - but still hopefully complete in a quicker amount of time thanks to the extra processing power of additional cores.

It’s just the “attributes” values under any keys that end in “dec35c318583”

That’s a good idea if those services are ones you’re having trouble with or you know aren’t needed.

I tried to avoid listing specific services in the book, because it just becomes a very tedious process of disabling services with no real explanation. My preference here is to run the LatencyMon tool and try to isolate issues specific services on specific machines.

I was also going to cover automating things like this in the book, but for the moment I just want to get all the information in one place and get it out.

Thanks again everyone.

1 Like

Page 2, “want ignore” probably needs a “to” somewhere.

Neil

Just out of curiosity, what does that VBscript look like, Rick? If LatencyMon does find some baddies, that would be handy to turn those on and off like you do there.

Terry

Thanks for those clarifications, Brad. This is great stuff to know! :smile:

Terry,

I’m in the process of cleaning the script up now, but when I’m done I’ll shoot you a copy. Basically, I’m reading in a text file with the ServiceName and ServiceDescription comma delimited. When shutting down the service, it stops it, then disables it. Reverse when starting… enable then start.

I’ll let you know!

Rick

1 Like

Hi @brad,

Excellent book! I thought I had my system well optimised for audio but there were a few things in the book that I had missed.

One question. In the section about 32/64 bit hosts, you mention that audio transfer is slower when bridging in a mixed 32/64 bit setup. Does this apply to Cantabile with built in jBridge support? I’m not entirely clear how jBridge works in terms of processes etc.

Neil

Hi Neil,

jBridge works by running the bridged plugin in a separate process and using some sort of interprocess comms to pass audio/midi data to/from it. Since you can’t call directly into another process there will always be an overhead to this. There are two ways to handle it:

  1. Wake the other process and block until it responds.
  2. Use some form of double buffering - wake the other program, don’t block but pickup the response from it on the next audio cycle.

The problem with 1) is that you’re blocking which is naughty as far as real-time audio goes.

The problem with 2) is that you’re introducing an additional audio cycle of latency with that plugin.

I’m not sure which approach jBridge uses. Bridging is handy when you need it but not without it’s drawbacks which means you should bridge as few plugins as possible.

Interesting, thanks Brad!

Neil

Latest revision of the book is now available from here.

I’ve also written a new section “The Kitchen Analogy” which attempts to explain the concepts of threads, interrupts and virtual memory using a restaurant kitchen as an analogy. I’m not sure whether to leave it in or not.

2 Likes

Thanks for sharing. On a quick skim through, there were some settings/tweaks that I was not aware of. So will be getting the ePub on my iPad and giving it a good read! :smiley:

Regards
Derek

Re: The Kitchen Analogy - Read it and liked it!

1 Like