Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #102582

Re: Throttle a process deliberately?

From Jolly Roger <jollyroger@pobox.com>
Newsgroups comp.sys.mac.system
Subject Re: Throttle a process deliberately?
Date 2017-03-18 23:26 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <ej5u0kFo6daU1@mid.individual.net> (permalink)
References <Wsednb6Wurj59lHFnZ2dnUU7-W_NnZ2d@giganews.com> <ej39qbF7q0uU1@mid.individual.net> <vMKdnR0oqvPUOlDFnZ2dnUU7-bXNnZ2d@giganews.com>

Show all headers | View raw


On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
> On 2017-03-17 19:29, Jolly Roger wrote:
>> On 2017-03-17, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>>
>>> I'm preparing some vids and using handbrake to make "small" copies.
>>> In the meantime I'm in DaVinci Resolve working on the next great
>>> thing.
>>>
>>> Is there a way in OS X to "throttle" handbrake down to no more than
>>> 75% of each core?  (It's maxing out each core and HT making DV
>>> Resolve 'jerky' when scrubbing.
>>>
>>> Handbrake itself has no such feature.
>>
>> I think you can pass :threads=n (where n is the number of cores you
>> want it to use) to Handbrake (possibly in the "Additional Options"
>> text field in the Video tab).
>
> Hmm - I'll try that - if I set 4 cores maybe it will use 4 full cores
> worth and the 4 HT balance will go to my video editor - about 30%
> overall CPU worth.  That would be cool.

That's my understanding of how it works. It lets you free up cores to do
other things.

> Oh - except now I have to figure out HB's CL (I use the GUI front end
> typically .. er only).  Damn you JR!

Actually, you can put ":threads=4" (without quotes) into the Handbrake
"Video" tab in the "Additional Options" text field, and Handbrake will
add that to the parameter list. 

I tried it with :threads=1 on my 8-core Mac Pro and Handbrake hovered
around 20-30% CPU usage for the limited time I let it run like that. I
much prefer all 8 cores be grinding at 100% to get the fastest encoding,
because this system still handles doing other tasks (even things like
playing FPS shooter and other 3D-rendered games) with minimal stutter.
It's going on 9 years old, but it's still a beast. : )

>>> In Windows one could assign cores to a process (or de-assign them
>>> using the affinity check boxes - tedious but it did it).    That's
>>> not the way I'd want to do it, but is there some OS prioritization
>>> method to "choke" Handbrake?
>>
>> You could try renicing it with something like:
>>
>> sudo renice n PID (where PID is Handbrake's process ID)
>
> Thanks - I'll give those a shot - any idea for a starting value of n?
> Never did figure out what the hell nice did.

If you do a ps axl you'll see an "NI" column that shows the nice value
for any process in the list.

>> You can also pause and continue any process with:
>>
>> kill -SIGSTOP PID kill -SIGCONT PID
>
> Only if I write a script or program to issue those every 100 ms or so.

I doubt that would be a good idea.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Back to comp.sys.mac.system | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-17 19:04 -0400
  Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-17 23:29 +0000
    Re: Throttle a process deliberately? Calum <com.gmail@nospam.scottishwildcat> - 2017-03-18 14:58 +0000
      Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-18 17:33 -0400
        Re: Throttle a process deliberately? Calum <com.gmail@nospam.scottishwildcat> - 2017-03-19 20:56 +0000
        Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-19 21:39 +0000
          Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 07:51 -0400
            Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 12:08 +0000
              Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 08:38 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 13:07 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 09:16 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 13:37 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 11:09 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 17:08 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 14:54 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 20:54 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 18:40 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 23:01 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-22 19:33 -0400
                Re: Throttle a process deliberately? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-03-23 05:22 +0000
          Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 07:53 -0400
            Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 12:03 +0000
              Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 08:39 -0400
                Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-21 13:08 +0000
                Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 09:25 -0400
      Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 09:32 -0400
    Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-18 17:31 -0400
      Re: Throttle a process deliberately? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2017-03-18 17:49 -0400
        Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 11:09 -0400
      Re: Throttle a process deliberately? Jolly Roger <jollyroger@pobox.com> - 2017-03-18 23:26 +0000
        Re: Throttle a process deliberately? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-03-19 17:21 +0000
        Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 09:35 -0400
      Re: Throttle a process deliberately? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-03-19 17:04 +0000
        Re: Throttle a process deliberately? Alan Browne <alan.browne@freelunchvideotron.ca> - 2017-03-21 11:07 -0400

csiph-web