Thursday, January 2, 2014

[LINUX_Newbies] Re: How to control traffic in Linux?

 

On 02Jan2014 16:56, highskywhy@yahoo.de <highskywhy@yahoo.de> wrote:
> > > zip is very unimportant and should work very slow
> > > how can I start zip and zip should use only a small part of the cpu
> >
> > nohup nice -n 15 zip command that is long >/dev/null >>/dev/null &
> *
> Sorry
> I do not understand.

What, specificly?

There are three commands above:

nohup ...

which dispatches the command "..." ignoring SIGHUP (which happens
at log out, window close, etc), with its output directed to the
file "nohup.out".

Then the command "..." is "nice -n 15 zip command that is long".

That one is itself two commands:

nice -n 15 ...

which runs the command "..." with greater niceness.

Then the command "..." is "zip command that is long" which I'm
taking to mean your chosen zip command. I suspect Trevor's example
originally was "command that is long" and then he inserted "zip".

The redirections ">/dev/null >>/dev/null" are not really necessary
or useful with nohup, and incorrrectly phrased anyway.

The final "&" is to put the command into the background i.e. you
get your prompt back immediately. If you nohup a command it is
generally because you do not want to wait for it to finish.

> > the 15 can be any number from 11 (slightly less important) to 20 (Only
> > when there is nothing else to do) 20 will run very slowly!
> *
> 11 is slow.
> What number is fast?

As Trevor's pointed out, negative numbers are "faster" - less nice.

However, you can also take the approach that your shell is "full
speed" and that you only ever need to slow things down, so you only
need to make things nicer, not less nice.

And it bears repeating: if you are only running one command that
is CPU intensive then the niceness is irrelevant, because it only
affects the share of the CPU given to the command.

"nice" is not slow: it is slower than other things.

Cheers,
--
Cameron Simpson <cs@zip.com.au>

More computing sins have been committed in the name of performance,
without necessariliy achieving it, than for all other reasons
combined. - Wulf

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (9)
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.

__,_._,___

No comments:

Post a Comment