Set a Higher CPU Priority and Save the Setting [SOLVED]

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

Set a Higher CPU Priority and Save the Setting [SOLVED]

#1 Post by Eathray »

Hi again everyone.

Gosh, I've read a couple dozen threads and can't find a clear instruction how to do this.

So obviously I know how to set the process to a higher priority in both Pprocess and Htop, and I've read several references to (I think) the bash (?) command 'nice' or setting... however one says it...

I just can't find a way to identify a program, set the cpu priority... and save the setting as a permanent setting... because... well obviously if a process needs a higher priority one time, it will probably need a higher priority most or all the time. The websites out there these days are ridiculously obese and even newer computers with good specs can sometimes get out of breath, let alone older machines.

If there's a thread I've missed, could someone point me the way? Is this something that should be modified in the browser or the process manager?

Thanks all,

Eathray
Last edited by Eathray on Fri 23 Dec 2016, 17:02, edited 1 time in total.
[i][b]Newly committed to relearning all the Puppy stuff I thought I used to know but can't remember.[/b][/i]

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

What is the computers specs?
What processor?
What version of Puppy?

I will guess.
Have you tried using menu->System->CPU Frequency scaling tool?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#3 Post by Eathray »

bigpup wrote:What is the computers specs?
What processor?
What version of Puppy?

I will guess.
Have you tried using menu->System->CPU Frequency scaling tool?
winbookj1
1gig pIII coppermine
512 ram
3 gig swap
4.2 smp by Aragon

I don't see the frequency scaling tool in the menu, but I can look and see if there's one available for a 4x puppy. How does it work?

thx

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#4 Post by Eathray »

Big Pup,

Okay there are at least 2 frequency scaling pets for 4x puppies, so I have that available. In reading through the threads for them, it didn't really seem clear that they could identify the browser and assign a greater priority.

thx

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#5 Post by Burn_IT »

It has nothing to do with frequency scaling.

It is done in the task manager and in the properties of the executable.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#6 Post by Eathray »

Burn_IT,

thanks,
It has nothing to do with frequency scaling.

It is done in the task manager and in the properties of the executable.
When you say the properties of the executable, do you mean the program I am trying to assign the higher priority to... in my case the browser? I wondered because I notice that, for example, Pmusic has a setting to assign a higher cpu priority... is that something I could add to my browser somehow?

eathray

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#7 Post by Eathray »

Burn_IT,

I have found what seems to be a command in Pmusic in the picture below. This setting is in a file called pmusicrc. Notice line 4:

Code: Select all

export HIGH_CPU=true
I have not found a corresponding rc file for SeaMonkey yet, but is this the kind of thing I could add to 'the executable' as you mentioned?

thx
Attachments
2016-12-23_07-26-35.jpg
(38.06 KiB) Downloaded 141 times

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#8 Post by Burn_IT »

That is not what I was refering to. If there is a parameter to the executable, the name would be up to the author of the program.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#9 Post by drunkjedi »

Go through the following article about setting priority to a command/software/process by changing it's 'niceness' values.
Using commands, 'nice' and 'renice'.

https://www.nixtutor.com/linux/changing ... processes/

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#10 Post by Eathray »

Burn_IT wrote:That is not what I was refering to. If there is a parameter to the executable, the name would be up to the author of the program.
Okay... is my example a 'parameter?' So you mean 'rc' won't necessarily correspond to the file I'm looking for in SeaMonkey? The executable called by the desktop icon is seamonkey-portable-0.5... but that's actually an executable folder. The file it appears to be calling is within... 'seamonkey-portable.' It does contain some 'export' lines inside it when I view it as text. Is this the location you might suggest? Is my example 'export HIGH_CPU=true' a valid parameter for what I want to do?

thx

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#11 Post by Eathray »

drunkjedi wrote:Go through the following article about setting priority to a command/software/process by changing it's 'niceness' values.
Using commands, 'nice' and 'renice'.

https://www.nixtutor.com/linux/changing ... processes/
Thanks drunjedi.

I will read it and report back.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#12 Post by drunkjedi »

You just have to add 'nice --1' as prefix to your browser's exec line in it's .desktop file.

So that each time you click the browser icon it will start with niceness of -1. You can lower that number more too if you want more priority.

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#13 Post by Eathray »

drunkjedi wrote:You just have to add 'nice --1' as prefix to your browser's exec line in it's .desktop file.

So that each time you click the browser icon it will start with niceness of -1. You can lower that number more too if you want more priority.
I have a feeling your deal is going to work, but I'm doing something wrong.

I added the nice value once and it opened a website called nice. I tried to separate with a comma, and it errored. I began with 'PREFIX=nice --1' and it said no such file... LOL

Could you please show me what the exec line should look like? That would be greatly appreciated.
[i][b]Newly committed to relearning all the Puppy stuff I thought I used to know but can't remember.[/b][/i]

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#14 Post by drunkjedi »

In my Fatdog the SeaMonkey .desktop file is at /usr/share/application. Yours maybe somewhere else as you are using portable seamonkey.

When you open it with Geany, it has 'Exec=seamonkey-spot %U' line.
Change it to 'Exec=nice --1 seamonkey-spot %U'

Just do same changes to the Exec= line, yours may be slight different.

Check the new niceness in htop.

Edit: Your portable seamonkey may not be using a .desktop file. The folder it points at must be a rox app.
You will have to edit a script inside that folder called 'AppRun'.
Could you just post that scripts contents.

To find that script, right click that executable portable seamonkey folder and select 'Look inside'.

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#15 Post by Eathray »

drunkjedi wrote:In my Fatdog the SeaMonkey .desktop file is at /usr/share/application.
When you open it with Geany, it has 'Exec=seamonkey-spot %U' line.
Change it to 'Exec=nice --1 seamonkey-spot %U'

Just do same changes to the Exec= line, yours may be slight different.

Check the new niceness in htop.
Holy Cow that worked!

Thank you so much and thanks everybody for responding.

Eathray

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#16 Post by drunkjedi »

Nice.

;)

User avatar
Eathray
Posts: 723
Joined: Sun 06 Sep 2009, 19:42

#17 Post by Eathray »

drunkjedi wrote:Nice.

;)
Haha :P
Edit: Your portable seamonkey may not be using a .desktop file. The folder it points at must be a rox app.
You will have to edit a script inside that folder called 'AppRun'.
Could you just post that scripts contents.
This is actually good information. Even though I ran my portable through the menu registry, not everybody does, so I'm sure someone will come along who needs to know this. Good edit/addition.

Post Reply