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


Groups > comp.sys.mac.system > #102515 > unrolled thread

Throttle a process deliberately?

Started byAlan Browne <alan.browne@freelunchvideotron.ca>
First post2017-03-17 19:04 -0400
Last post2017-03-21 11:07 -0400
Articles 14 on this page of 34 — 5 participants

Back to article view | Back to comp.sys.mac.system


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#102710

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 07:53 -0400
Message-ID<38WdnRFkhOLMiUzFnZ2dnUU7-ekAAAAA@giganews.com>
In reply to#102625
On 2017-03-19 17:39, Jolly Roger wrote:
> On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>> On 2017-03-18 10:58, Calum wrote:
>>> On 17/03/2017 23:29, Jolly Roger wrote:
>>>
>>>> You could try renicing it with something like:
>>>>
>>>> sudo renice n PID
>>>> (where PID is Handbrake's process ID)
>>>>
>>>> You can also pause and continue any process with:
>>>>
>>>> kill -SIGSTOP PID
>>>> kill -SIGCONT PID
>>>
>>> Or if you want a (simple) GUI, you could try AppPolice:
>>>
>>> <https://github.com/fuyu/AppPolice>
>>
>> ooooohhh! any experience with it?
>
> I just tried it, and it gives you a really nice little slider to control
> how much CPU time a process gets. The load was spread evenly across all
> cores.I have Handbrake pushing a fairly constant 770-795% CPU on my
> 8-core MacPro, and was able to smootlhy throttle it down to 0% or
> anywhere between, while watching the system CPU meter respond
> accordingly.  Nice little utility. : )

How do you install it?  Do you need XCode?  I removed it because I was 
tired of the monster updates.  (I compile command line).


-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102711

FromJolly Roger <jollyroger@pobox.com>
Date2017-03-21 12:03 +0000
Message-ID<ejcj58F3eg4U1@mid.individual.net>
In reply to#102710
Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
> On 2017-03-19 17:39, Jolly Roger wrote:
>> On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>> On 2017-03-18 10:58, Calum wrote:
>>>
>>>> Or if you want a (simple) GUI, you could try AppPolice:
>>>> 
>>>> <https://github.com/fuyu/AppPolice>
>>> 
>>> ooooohhh! any experience with it?
>> 
>> I just tried it, and it gives you a really nice little slider to control
>> how much CPU time a process gets. The load was spread evenly across all
>> cores.I have Handbrake pushing a fairly constant 770-795% CPU on my
>> 8-core MacPro, and was able to smootlhy throttle it down to 0% or
>> anywhere between, while watching the system CPU meter respond
>> accordingly.  Nice little utility. : )
> 
> How do you install it?  Do you need XCode?  I removed it because I was 
> tired of the monster updates.  (I compile command line).

Nah. I just grabbed a compiled binary.

-- 
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

[toc] | [prev] | [next] | [standalone]


#102716

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 08:39 -0400
Message-ID<C_adnQVmH9dsg0zFnZ2dnUU7-fUAAAAA@giganews.com>
In reply to#102711
On 2017-03-21 08:03, Jolly Roger wrote:
> Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>> On 2017-03-19 17:39, Jolly Roger wrote:
>>> On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>>> On 2017-03-18 10:58, Calum wrote:
>>>>
>>>>> Or if you want a (simple) GUI, you could try AppPolice:
>>>>>
>>>>> <https://github.com/fuyu/AppPolice>
>>>>
>>>> ooooohhh! any experience with it?
>>>
>>> I just tried it, and it gives you a really nice little slider to control
>>> how much CPU time a process gets. The load was spread evenly across all
>>> cores.I have Handbrake pushing a fairly constant 770-795% CPU on my
>>> 8-core MacPro, and was able to smootlhy throttle it down to 0% or
>>> anywhere between, while watching the system CPU meter respond
>>> accordingly.  Nice little utility. : )
>>
>> How do you install it?  Do you need XCode?  I removed it because I was
>> tired of the monster updates.  (I compile command line).
>
> Nah. I just grabbed a compiled binary.
>

?  Where did you find a trustable compiled version?

-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102719

FromJolly Roger <jollyroger@pobox.com>
Date2017-03-21 13:08 +0000
Message-ID<ejcmugF3ob3U3@mid.individual.net>
In reply to#102716
On 2017-03-21, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
> On 2017-03-21 08:03, Jolly Roger wrote:
>> Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>> On 2017-03-19 17:39, Jolly Roger wrote:
>>>> On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>>>> On 2017-03-18 10:58, Calum wrote:
>>>>>
>>>>>> Or if you want a (simple) GUI, you could try AppPolice:
>>>>>>
>>>>>> <https://github.com/fuyu/AppPolice>
>>>>>
>>>>> ooooohhh! any experience with it?
>>>>
>>>> I just tried it, and it gives you a really nice little slider to control
>>>> how much CPU time a process gets. The load was spread evenly across all
>>>> cores.I have Handbrake pushing a fairly constant 770-795% CPU on my
>>>> 8-core MacPro, and was able to smootlhy throttle it down to 0% or
>>>> anywhere between, while watching the system CPU meter respond
>>>> accordingly.  Nice little utility. : )
>>>
>>> How do you install it?  Do you need XCode?  I removed it because I was
>>> tired of the monster updates.  (I compile command line).
>>
>> Nah. I just grabbed a compiled binary.
>
> ?  Where did you find a trustable compiled version?

Click the "releases" tab on GitHub.

I also downloaded the source in case I want to look at or hack it.

-- 
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

[toc] | [prev] | [next] | [standalone]


#102721

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 09:25 -0400
Message-ID<aP6dncOB49lFtEzFnZ2dnUU7-d_NnZ2d@giganews.com>
In reply to#102719
On 2017-03-21 09:08, Jolly Roger wrote:
> On 2017-03-21, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>> On 2017-03-21 08:03, Jolly Roger wrote:
>>> Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>>> On 2017-03-19 17:39, Jolly Roger wrote:
>>>>> On 2017-03-18, Alan Browne <alan.browne@freelunchvideotron.ca> wrote:
>>>>>> On 2017-03-18 10:58, Calum wrote:
>>>>>>
>>>>>>> Or if you want a (simple) GUI, you could try AppPolice:
>>>>>>>
>>>>>>> <https://github.com/fuyu/AppPolice>
>>>>>>
>>>>>> ooooohhh! any experience with it?
>>>>>
>>>>> I just tried it, and it gives you a really nice little slider to control
>>>>> how much CPU time a process gets. The load was spread evenly across all
>>>>> cores.I have Handbrake pushing a fairly constant 770-795% CPU on my
>>>>> 8-core MacPro, and was able to smootlhy throttle it down to 0% or
>>>>> anywhere between, while watching the system CPU meter respond
>>>>> accordingly.  Nice little utility. : )
>>>>
>>>> How do you install it?  Do you need XCode?  I removed it because I was
>>>> tired of the monster updates.  (I compile command line).
>>>
>>> Nah. I just grabbed a compiled binary.
>>
>> ?  Where did you find a trustable compiled version?
>
> Click the "releases" tab on GitHub.

Nice.  Works well so far.  I'll do some video work later and we'll see 
if there are any issues.


-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102723

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 09:32 -0400
Message-ID<d6adnT06a8cXtkzFnZ2dnUU7-d2dnZ2d@giganews.com>
In reply to#102549
On 2017-03-18 10:58, Calum wrote:
> On 17/03/2017 23:29, Jolly Roger wrote:
>
>> You could try renicing it with something like:
>>
>> sudo renice n PID
>> (where PID is Handbrake's process ID)
>>
>> You can also pause and continue any process with:
>>
>> kill -SIGSTOP PID
>> kill -SIGCONT PID
>
> Or if you want a (simple) GUI, you could try AppPolice:
>
> <https://github.com/fuyu/AppPolice>

THANKS!  Perfect so far!

-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102576

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-18 17:31 -0400
Message-ID<vMKdnR0oqvPUOlDFnZ2dnUU7-bXNnZ2d@giganews.com>
In reply to#102521
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.

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

>
>> 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.

>
> 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.



-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102579

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2017-03-18 17:49 -0400
Message-ID<58cdab6e$0$29110$c3e8da3$38634283@news.astraweb.com>
In reply to#102576
On 2017-03-18 17:31, Alan Browne wrote:

> 
> Thanks - I'll give those a shot - any idea for a starting value of n? 
> Never did figure out what the hell nice did.


Sets process priority(*) for Unix Os.

-20 is highest priority, +19 is lowest. 0 is standard.


(The higher the value, the nicer that process is towards other processes
by yielding CPU to them more often)


(the "niceness" is not the only parameter used by kernel to place
process in the compute queue when many are waiting for CPU, so it is
only part of what is used to give a process its priority).

[toc] | [prev] | [next] | [standalone]


#102732

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 11:09 -0400
Message-ID<-9udnRpVL5Cg30zFnZ2dnUU7-f8AAAAA@giganews.com>
In reply to#102579
On 2017-03-18 17:49, JF Mezei wrote:
> On 2017-03-18 17:31, Alan Browne wrote:
>
>>
>> Thanks - I'll give those a shot - any idea for a starting value of n?
>> Never did figure out what the hell nice did.
>
>
> Sets process priority(*) for Unix Os.
>
> -20 is highest priority, +19 is lowest. 0 is standard.
>
>
> (The higher the value, the nicer that process is towards other processes
> by yielding CPU to them more often)
>
>
> (the "niceness" is not the only parameter used by kernel to place
> process in the compute queue when many are waiting for CPU, so it is
> only part of what is used to give a process its priority).

The problem with that approach (I believe) is that when the video editor 
is between scrubs it would give up cycles just when I'm about to need 
them.  HB would grab and saturate every 10 ms slot.

-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102582

FromJolly Roger <jollyroger@pobox.com>
Date2017-03-18 23:26 +0000
Message-ID<ej5u0kFo6daU1@mid.individual.net>
In reply to#102576
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

[toc] | [prev] | [next] | [standalone]


#102606

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-03-19 17:21 +0000
Message-ID<slrnoctfmo.1sqs.g.kreme@snow.local>
In reply to#102582
In message <ej5u0kFo6daU1@mid.individual.net> Jolly Roger <jollyroger@pobox.com> wrote:
> If you do a ps axl you'll see an "NI" column that shows the nice value
> for any process in the list.

Yeah, but it's going to be zero.

 $ ps axl| wc -l; ps axl | awk  '{ if ($6 != 0) print $0 }' |wc -l
    438
    4

(And one of those lines is the ps header line)

 UID   PID  PPID CPU PRI NI      VSZ    RSS WCHAN  STAT   TT       TIME COMMAND
   0    87     1   0  37 10  2499744   3704 -      SNs    ??  0:02.67 /usr/libexec/warmd
   0   282     1   0  20  1  2453560    556 -      SNs    ??  0:00.01 /usr/libexec/periodic-wrapper daily
 222  9484     1   0   4 20  2471784  14492 -      SNs    ??  0:01.52 /usr/sbin/netbiosd

-- 
Against stupidity the gods themselves contend in vain.

[toc] | [prev] | [next] | [standalone]


#102724

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 09:35 -0400
Message-ID<d6adnTw6a8eysUzFnZ2dnUU7-d2dnZ2d@giganews.com>
In reply to#102582
On 2017-03-18 19:26, Jolly Roger wrote:
> 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.

Ah, something to try if AppPolice doesn't pan out.  Or even if it does.

>
> 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.

Ya think!


-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [next] | [standalone]


#102605

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-03-19 17:04 +0000
Message-ID<slrnocten7.1sqs.g.kreme@snow.local>
In reply to#102576
In message <vMKdnR0oqvPUOlDFnZ2dnUU7-bXNnZ2d@giganews.com> 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.

An application cannot tell the difference between, as you say, a "full
core" and a hyperthread core. They are all "full cores".

> Thanks - I'll give those a shot - any idea for a starting value of n? 

How many cores do you have? Use that for n. Or n-1.

Also, I tend to use Don Melton's scripts for Handbrake. Just throwing
that out there. They are way better than any futzing about I do. I made
a lovely Mad Max Fury Road: Black and Chrome rip with them. Looks
absolutely perfect.

-- 
Nothing is impossible for those who don't have to do it.

[toc] | [prev] | [next] | [standalone]


#102730

FromAlan Browne <alan.browne@freelunchvideotron.ca>
Date2017-03-21 11:07 -0400
Message-ID<-9udnRhVL5Aw3EzFnZ2dnUU7-f_NnZ2d@giganews.com>
In reply to#102605
On 2017-03-19 13:04, Lewis wrote:
> In message <vMKdnR0oqvPUOlDFnZ2dnUU7-bXNnZ2d@giganews.com> 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.
>
> An application cannot tell the difference between, as you say, a "full
> core" and a hyperthread core. They are all "full cores".

4 are the "real" cores and 4 HT are just another set of registers.  The 
core flips between one set of registers and the other to effect HT.

When hyperthreading you get about a 30% processing gain (dependent on 
the sort of processing that it is).  So, if I assign "4 cores" and it 
takes 4 full cores worth of processing, then the remainder would be that 
(more or less) 30% of actual remaining processing power that comes from 
the register set flipping.

IAC, for now I'll try AppPolice as it's easy to change on the fly, as 
needed.

>> Thanks - I'll give those a shot - any idea for a starting value of n?
>
> How many cores do you have? Use that for n. Or n-1.
>
> Also, I tend to use Don Melton's scripts for Handbrake. Just throwing
> that out there. They are way better than any futzing about I do. I made
> a lovely Mad Max Fury Road: Black and Chrome rip with them. Looks
> absolutely perfect.

My HB'ing is mainly for changing formats (containers if you prefer) or 
changing resolution down for distribution.  Going beyond that for any 
special effects isn't of any interest.  In video editing (DaVinci 
Resolve) I'll do colour correction and sharpening as pretty much the 
limit of processing I do to an image.


-- 
"If war is God's way of teaching Americans geography, then
recession is His way of teaching everyone a little economics."
   ..Raj Patel, The Value of Nothing.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.sys.mac.system


csiph-web