XP : using bat file to start MAX in High Priority mode

Drsbaitso's icon

I've noticed a significant increase in stability of the scheduler and multitasking under XP when changing Max to High priority via Windows Task Manager. However, when trying to invoke High priority mode via a .bat file as

start /HIGH /d"C:Program FilesCycling '74MaxMSP 4.5" max.exe

..inspecting the priority under task manager shows it UNCHANGED as Normal priority, requiring it to be set manually. I could have my syntax above incorrect (god help me), but it seems to me that starting max with a High priority may be locked. I do know that the following works correctly...

start /HIGH notepad.exe

inspecting taskmanager shows that the priority as successfully changed..

Now I wouldn't normally mind but setting Max to high seems to work wonders when using vsts and OSC messages, I get no breakups when changing max out of the foreground and such, and would love to see either whatever it is that prevents priority alteration at max startup unlocked or an option somewhere for us windows users, it really does make things a lot more stable! Of course, it works only by setting in manually in the task manager at the current time.

binez0r

Andrew Pask's icon

Cool.

Thanks for that - we'll check it out and I'll let you know if we find out anything.

-A

Anthony Palomba's icon

If you haven't already, you should set the processor scheduling
setting to background services.

Anthony

Anthony Palomba's icon

The WinXP processor scheduling setting that is.

Trond Lossius's icon

How do you do this? Pardon me, but I'm completely ignorant on how to
tweek the XP environment.

Thanks,
Trond

cebec's icon

here you go!

the main page:

tuning tips, incl. setting processor scheduling to background:

Anthony Palomba's icon

Processor scheduling should be set to background services and not
Programs.

Go to:
Start > Settings > Control Panel > System > Advanced > Performance
Settings > Advanced Tab > Background Services

Drsbaitso's icon

Wow, I have to wonder when people give advice if they have tested it themselves. To both of those who replied stating that the CORRECT ANSWER was to turn on background services, you both are horribly incorrect. It would help if you tried my example before posting a solution to it and seeing for yourself. Your reference to enabling background services is about as irrelevant to this topic as responses come. Please, if you don't have a clue what you're talking about, don't post. Thank you.

binez0r

Drsbaitso's icon

Oh and the reason why I'm saying that is because I've had background services enabled since the first week I've had XP, which was, oh 3-4 years ago. That is not, and never will be, the answer to this problem. It is something hardcoded in MAX that prevents the start command from setting the priority of the application. At least, thats what seems logical to me based on how the majority of my applications respond to setting the priority at loadtime.

cebec's icon

uh, what? i was just answering Trond's question and posting for the general welfare of anyone who might not have seen that site... chill, man.

Drsbaitso's icon

Well send him a private message then and don't mess up my post with irrelevant information.

Anthony Palomba's icon

Excuse me, what are YOU talking about. The setting allows
the OS scheduler to give more time to service audio interrupts
so that you will not get audio drop out. THis is definitely relevant
because if you are pushing your machine to its edge you would
want to make sure audio interrupts are serviced FIRST. It is something
that should definitely be set if it is not. If it was not, it might
even fix your problem so you would not have to do any crazy command
line thread priority changes. I was trying to be helpful which was
why I offered this bit of wisdom.

Sorry my comment was "horribly incorrect", I did not know you were
going to be such a jerk about it. Next time I won't bother.

Anthony

Drsbaitso's icon

You're right Anthony, I'm sorry. However I did mention above that Background Services in the system panel was enabled. My complaint was that you hadn't understood or properly read my initial (or later) post. If you would like a better explanation of the problem, which I don't think is above your head, I would be happy to offer it to you via email. However, I'd appreciate it if you could leave this post alone so I can find a solution to the problem I am having (which is not related to enabling Background services in the system panel)... Thank you

Andrew Pask's icon

Regarding the original question.

As far as we're concerned it's a bug in the windows xp start command. A workaround is to add max to the system path.

1. Right click on My Computer and choose properties.
2. Click on the advanced tab of the System Properties dialog.
3. Click on the Environment Variables button.
4. In the lower pane (for System variables) scroll down to the Path variable.
5. Select Path and click Edit.
6. To the end of the string in the Variable Value box, add and semicolon and the path to whatever was there before. Something like:
;C:Program FilesCycling '74MaxMSP 4.5

Try the batch file again - it now works for us.

Cheers

-A

monged's icon

> start /HIGH /d"C:Program FilesCycling '74MaxMSP 4.5" max.exe

Try this instead:

cd "C:Program FilesCycling '74MaxMSP 4.5"
start /HIGH max.exe

Drsbaitso's icon

monged:

Ahhhhhhhhhhhhh =D boy do I feel stupid. Here I thought it was something in max because my script above launched it so I presumed the syntax was correct. Call off the search, the answer has been found :D Thank you very much.

binez0r

///////////////////////////////////////////////////////////