Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to be able to open an app faster than the normal time it takes to open it. What kind of script of changes do I have to do to make it so that when the app starts to open it receives more priority in CPU and more resources to help open it quicker.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Try preload and zram.

preload

Preload applications in memory - the next time you run the same app it'll open faster:

sudo apt-get install preload

zram

Compressed swap in ram - zram: http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html

sudo add-apt-repository ppa:shnatsel/zram
sudo apt-get update
sudo apt-get install zramswap-enabler

..and restart your computer.

share|improve this answer
add comment

You may want to have a look at Preload. This is a daemon that will pay attention to what applications you use most frequently and load them into memory at startup, which can greatly improve load times. You can install it from the archives.

share|improve this answer
add comment

Crude answer till you get better ones:

my_pid=$(ps -e | grep firefox | head -c 5 | tail -c 4)

gives the PID of the process

renice -1 $my_pid

would increase the renice

you can put this in an infinite loop using

sleep 60s

share|improve this answer
    
Two things: 1) you need a negative nice value, not positive; 2) rather than renicing multiple times after launch, how about launching the process with the desired 'nice' value from the beginning, as in nice -n -10 firefox? Of course you would need the permissions to do that, probably adjustable under /etc/security/limits*. –  pablomme Feb 9 '12 at 14:48
    
I agree. But, I assumed that the process was already on. For instance, if a user is into programming and his a.out pops out randomly; such a code would probably be good before starting out the programming session. Further, if necessary, one could use alias mod_firefox = 'nice -n -10 firefox' with the necessary permissions as you suggested. –  user44549 Feb 9 '12 at 14:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.