| Autore |
Messaggio |
michaa
|
|
Oggetto: customize "nice" an application
Inviato: Lug 11, 2007 - 10:38 AM
|
|
Registrato: Dic 02, 2006
Messaggi: 2186
|
|
Hi,
is it possible to edit the default nice value of an application, i.e. is it possible to start an application/process like kio_fish or kio_file with an other nice value than "0". May I customize an save this?
I know how to change the nice parameter with htop, but with the above mentioned processes I'd like to give them less priority each time I use it because otherwise it is no fun to work with the comp while copying (a) large file(s) from my server to my ws.
So is it possible? How? |
|
|
| |
|
|
|
 |
Ge0rgy
|
|
Oggetto: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 10:51 AM
|
|

Registrato: Dic 04, 2006
Messaggi: 753
|
|
well, kio-slaves are not exactly independent programs, but rather sort of a plugin for konqueror.
concerning programs i would suggest writing a little script that starts the program with nice level. but in such a case im not sure how to control this (must be a setting in KDE itself)
normally they should not have a that hard impact on the system-performance. but io-scheduling in the kernel is getting better.
perhaps something network or HDD-related keeps the system busy and causes the slowdown.
you can try using other programs at first to find out if only the kio-slaves show that behavior, or if the whole system is problematic.
greetings.
me |
_________________ "What is this talk of 'release'? We do not make software 'releases'.
Our software 'escapes', leaving a bloody trail of designers and quality
assurance people in its wake." --unknown
|
| |
|
|
|
 |
severin
|
|
Oggetto: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 11:27 AM
|
|

Registrato: Dic 04, 2006
Messaggi: 1632
|
|
| have you ever tried about renicing konqueror? |
|
|
| |
|
|
|
 |
michaa
|
|
Oggetto: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 11:54 AM
|
|
Registrato: Dic 02, 2006
Messaggi: 2186
|
|
|
severin ha scritto:
have you ever tried about renicing konqueror?
This was what I did first ... and it worked well. So my question is not explicitly conected to kio_xy. It is only about how an where to customise whatever application with an other nice value and save this a default.
With my 900 duron / 512 RAM copying a file from my home server to my ws means ... waiting or use a slow motion pc. But it is the same with **multimedia** doing something. Each cpu intensiv action slows down my system so much that I really is no fun to work with. With windows ( I have to mention it ) you may give the application in foreground the most priority by default, a feature I miss heavily in linux. |
|
|
| |
|
|
|
 |
devil
|
|
Oggetto: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 12:22 PM
|
|
Team Member

Registrato: Nov 24, 2006
Berlin
Messaggi: 4833
|
|
htop allows to set nice levels, but i never used it (no need so far)
greetz
devil |
_________________ >>we are sidux - resistance is futile - you will be assimilated<<
|
| |
|
|
|
 |
michaa
|
|
Oggetto: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 12:42 PM
|
|
Registrato: Dic 02, 2006
Messaggi: 2186
|
|
@ devil
I know that, but I'd like to save it |
_________________ suche 2-3x256 o 2-3x512 MB 168 pin RAM ggf. ---> PM
Meine HW: asus A7V133-C , 512 RAM, nvidia FX5200 (Gainward), sb128pci ; classic-ide-only system with additional ide-hostadapter: promise Ultra100TX2;
|
| |
|
|
|
 |
severin
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 01:14 PM
|
|

Registrato: Dic 04, 2006
Messaggi: 1632
|
|
I found something in a gentoo forum, not very elegant though: they said to create a wrapper bash script around konqueror
Maybe somebody else knows something nicer (SCNR) |
|
|
| |
|
|
|
 |
craigevil
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 01:45 PM
|
|

Registrato: Nov 30, 2006
Messaggi: 636
Località: USA
|
|
You can always try AND:
auto nice daemon
Citazione:
The auto nice daemon activates itself in certain intervals and renices jobs according to their priority and CPU usage. Jobs owned by root are left alone. Jobs are never increased in their priority.
If you need to increase the priority of a job, like cdrecord or MP3 or DVD players, this isn't really a job for and(8) but for a wrapper. Due to popular demand, I wrote such a wrapper. Get the code.
AND is very flexible. The renice intervals can be adjusted as well as the default nice level and the activation intervals. A priority database stores user/group/job/ancestor tuples along with their renice values for three CPU usage time ranges. Negative nice levels are interpreted as signals to be sent to a process, triggered by CPU usage; this way, Netscapes going berserk can be killed automatically. The strategy for searching the priority database can be configured.
AND also provides network-wide configuration files with host-specific sections, as well as wildcard/regexp support for commands in the priority database.
It is in the Debian repos. Using AND along with preload and prelink my system flies. |
_________________ Debian Tips My Debian sources.list
"If you can't apt-get something, it isn't useful or doesn't exist"
|
| |
|
|
|
 |
michaa
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 02:20 PM
|
|
Registrato: Dic 02, 2006
Messaggi: 2186
|
|
@ craigevil
your my hero, I think this is what I missed for a long time now and what my comp needed urgently. I've now installed it and reading about config and priorities.
Could you please be a bit more verbose about preload and prelink?
Thanks
PS: you did miss to mention this :
He did it again, comrade system administrator!
-- desperate Comrade Stanitzki, after some DAU again launched yet another un-niced 100+ CPU-hour job on a shared workstation.
AND is here to help. It was born from the desparate cries of a thousand regular users suffering from above DAU.
( in my case: ...cries of one user suffering from some cpu consuming application ) |
Ultima modifica di michaa il Lug 11, 2007 - 02:32 PM, modificato 1 volta in totale
|
| |
|
|
|
 |
severin
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 11, 2007 - 02:26 PM
|
|

Registrato: Dic 04, 2006
Messaggi: 1632
|
|
@craigevil: I've just briefly read up on prelink (from the gentoo documentation). It seems to re-write my binaries, so I'd think it's necessary to run it after every dist-upgrade; besides I'd think it takes a long time to have it prelink the entire system; these two things seem to make it very unsuitable to anything but debian stable. Could you comment a little on this?
Where do you set your "KDE_IS_PRELINKED="true"" ? I tried exporting it from /etc/init.d/bootmisc.sh, but bash doesn't see it?
EDIT: looks like /etc/profile is the correct place to set environment variables in debian |
|
|
| |
|
|
|
 |
craigevil
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 13, 2007 - 02:05 PM
|
|

Registrato: Nov 30, 2006
Messaggi: 636
Località: USA
|
|
Put this command into terminal to install Prelink:
su apt-get install prelink
3. Now put this command into the terminal:
su kedit /etc/default/prelink
4. Change where it says “PRELINKING=unknown” from unknown to “yes”
5. Adjust the other options if you know what the heck you’re doing. If it looks foreign to you, the defaults work well.
6. To start the first prelink (the longest one!), put this in terminal:
su prelink -vAm
Automatic Prelinking After Program Are Installed
One problem with prelinking in that when you install new programs those programs are not prelinked. So to avoid this problem when installing programs with apt-get or synaptic, use the directions below.
1. Put this in terminal:
kdesu kedit /etc/apt/apt.conf
2. When the file opens in Kedit, put this line at the end of the file and save (even if the file has no content before you add the line):
DPkg::Post-Invoke {”echo Running prelink, please wait…;/etc/cron.daily/prelink”;}
General Notes About Prelinking
In the future, prelink performs a quick prelink (a less-than-1-minute procedure on most systems) daily, usually at midnight. Every 14 days, or whatever you changed it to be, a full prelink will run.
If you just did a major apt-get upgrade that changed systemwide libraries (i.e. libc6, glibc, major gnome/X libs, etc etc etc) and experience cryptic errors about libs, rerun step 6.
To undo prelink, change step 4 from yes to no, then rerun step 6.
Prelinking will make the binaries it prelinks change, so it’s not appropriate if you have tripwire or another checksum-based IDS system, or if you do incremental or differential backups to save on space.
prelink
http://www.linuxcommand.org/man_pages/prelink8.html
Most people that run Sid do not recommend using prelink, that said I have used it since I first installed Kanotix almost 3 yrs ago with no problems.
"preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times."
http://sourceforge.net/projects/preload |
_________________ Debian Tips My Debian sources.list
"If you can't apt-get something, it isn't useful or doesn't exist"
|
| |
|
|
|
 |
DeepDayze
|
|
Oggetto: RE: Re: RE: customize "nice" an application
Inviato: Lug 13, 2007 - 02:31 PM
|
|
Registrato: Dic 02, 2006
Messaggi: 2462
|
|
| Prelink's a lot like WinXP's Prefetch it appears, as the mechanism behind both prelink and prefetch are similar in both implementations |
|
|
| |
|
|
|
 |
severin
|
|
Oggetto: Re: RE: Re: RE: customize "nice" an application
Inviato: Lug 16, 2007 - 07:54 AM
|
|

Registrato: Dic 04, 2006
Messaggi: 1632
|
|
|
craigevil ha scritto:
kdesu kedit /etc/apt/apt.conf
2. When the file opens in Kedit, put this line at the end of the file and save (even if the file has no content before you add the line):
DPkg::Post-Invoke {”echo Running prelink, please wait…;/etc/cron.daily/prelink”;}
I could not get this to work due to the blanks in "Running prelink, please wait...". I guess it's just a matter of protecting the string by the right type of quotation marks, but for the time being I changed it to "Prelinking..."
EDIT: This one works:
Codice:
DPkg::Post-Invoke {"echo Running prelink, please wait...";"/etc/cron.daily/prelink";};
|
|
|
| |
|
|
|
 |
|
|