Mar 10, 2014

Boot time in Ubuntu with Dropbox

I remember, some time ago, my system used to boot in few seconds and I even tried to optimize the time by installing minimal window systems. I had some friends who bought solid state hard disks, who came down to five seconds. Some linux distributions focused explicitly on boot time. Now, my booting time is extremely slow and I have to wait up to several minutes for my computer to boot, even on my new desktop computer with a ...standard installation. A significant part of the booting time is taken up by dropbox and in this post I explain what I did to bring down this time and to get at least a bit more reasonable boot time.

My ubuntu startup is sometimes extremely slow. When I check the CPU usage, dropbox comes up as one of the heaviest shares. What to do? One option is to change the nice level (process priority) of dropbox. But then, why not use a more specific limit? cpulimit attempts to limit the cpu usage of a process, so let's use that with dropbox!

We start by installing cpulimit. In ubuntu

sudo apt-get install cpulimit

... will do

We need to identify the process which we want to limit. One way is by process id (pid). Let's get the dropbox process id:

ps aux | grep dropbox | grep -v grep | awk '{print $2}'

There is another option to use the absolute path, but I am using the pid here.

Now we need to plug this into the cpulimit syntax, which is as follows:

cpulimit --pid= --limit=

The command can now look like this:

cpulimit --pid=$(ps aux | grep dropbox | grep -v grep | awk '{print $2}') --limit=10

In the terminal, I put an ampersand at the end, to run the command in the background.

For now, everything seems to run smoothly. Dropbox' cpu share is reduced and the system responses seem quicker. Let's see how it works...

I enter this command in the gnome menu of startup applications, behind the dropbox command. Combined it can look as follows:

echo "nice dropbox start -i & cpulimit --pid=$(ps aux | grep dropbox | grep -v grep | awk '{print $2}') --limit=10" | at now + 10 min

Enjoy. Please leave a comment below for questions and suggestions.

10 comments:

  1. This sounds cool, do you have article about how to manage Bitcoins wallet in Ubuntu? I want to know more about buying bitcoins with paypal so that I can buy some stuff online with Bitcoins.

    ReplyDelete
  2. moncler soldes C'est doudoune moncler pas cher vraiment un petit vallon peut cependant cents zone de mètres carrés, et entouré de montagnes, à quelques kilomètres sont hautes falaises, tellement même ceux qui contrôlent les instruments moncler soldes utilisés pour réparer, il faudrait prendre l'avion pour s'envoler. Boom. Juste pour entrer dans la vallée, derrière entendu un bruit vint inconsciemment regardé en arrière.

    moncler soldes Coeurs surpris, il semble que, pour faire face à leur propre, l'autre a été bien préparé, et maintenant même le ciel est bloqué, vous voulez empêcher de s'échapper. Oh, nous ne savons pas qui va moncler moncler pas cher soldes l'exécuter. Sourire froid. La construction de la base de la forte digne, ils doivent mystifier, et en sortir. Bientôt Lenghe.

    moncler soldes Étroite vallée dans la vallée du Département, a été rempli de débris, toute la vallée est maintenant moncler soldes complètement fermée, en plus de voler vers le ciel n'a pas de moyen de sortir. Voir le ciel, un moncler soldes Jinmang jaillit.

    ReplyDelete
  3. The key reason why compose as soon as you don't have a plan or maybe survey company. Should you compose using not a proper get started, you're confined so as to fall. Get prepared to your survey. that will help you lots with regard to every schooling making companies.

    ReplyDelete
  4. Normal articles are the most common type of writing assignment. These articles are of 300 to 1000 words on any given topic. One does not require any specialized or proficient skills to write. The amount paid to write depends upon fame of the writer and the kind of arrangement dealt with the client. get your essay writing assistance here for quality and on time writing services with responsible cost.

    ReplyDelete
  5. A good informative post that you have shared and appreciate your work for sharing the information.

    ReplyDelete
  6. Those of the interesting information you always bring out the best that I know, thanks.

    ReplyDelete