Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Toward more ruly background apps

Reply
Thread Tools

Toward more ruly background apps

 
 
Roedy Green
Guest
Posts: n/a
 
      11-24-2011
I usually have at least one active background task going, e.g. defrag,
build, search and replace script, indexing, backup, Jet compile,
program load, source code tidy, email fetch, FTP upload, macro
expansion to regenerate my website ....

The problem is these often interfere with my foreground work. I hit a
key and nothing happens for several seconds. I find it quite hard to
type word without the instant visual feedback.

The background task may be hogging the CPU or the disk. Back in the
60s I learned about what OS's were supposed to do to ameliorate this,
giving higher priority to i/o bound tasks and higher priority to tasks
a human was sitting there waiting for.

I am using Windows 7 on a dual CPU which was orders of magnitude
resources to play with that the computers of that day, but it does not
seem to be doing all that well.

So some questions:

1. Is there anything I can do to make my OWN background Java apps
better behaved, to notice disk or CPU is tight and back off? or lower
their priority to CPU or disk?

2. Is there anything I can do to configure some sort of allocation of
the CPU and disk where various combos of app are running?

3. Is there anything I can do quickly when my computer is sluggish to
throttle but not kill the culprit?

4. Do Linux people fare any better? I imagine most windows users have
programs in the background, but they would nearly always be idle. This
problem is likely not high on the MS priority list.
--
Roedy Green Canadian Mind Products
http://mindprod.com
I can't come to bed just yet. Somebody is wrong on the Internet.
 
Reply With Quote
 
 
 
 
Silvio Bierman
Guest
Posts: n/a
 
      11-24-2011
On 11/24/2011 02:44 PM, Roedy Green wrote:
>
> 4. Do Linux people fare any better? I imagine most windows users have
> programs in the background, but they would nearly always be idle. This
> problem is likely not high on the MS priority list.


I run Linux on a laptop with an Intel i7 inside (where else would it
be?). I usually have a running VirtualBox that runs either WindowsVista
or Windows7 to have an IE/Windows client test environment for my web
application development. Windows is usually quite idle except for a
running IE and sometimes OpenOffice but I have to assign at least two of
my eight cores and plenty of memory to it to have any decent response
when typing etc.

On the Linux side I never have any responsiveness problems like that.

Nothing is perfect, though. There seems to be a bug somewhere that
disables my touchpad permanently every now and then during typing which
is very annoying when the laptop is actually, well, on my lap. Luckily
in Linux this can always be solved with some command line that can be
attached to a key stroke so a simple CTRL+ALT+` fixes that.

Is there a particular reason you run Windows?
 
Reply With Quote
 
 
 
 
Jeffrey H. Coffield
Guest
Posts: n/a
 
      11-24-2011


On 11/24/2011 05:44 AM, Roedy Green wrote:
> I usually have at least one active background task going, e.g. defrag,
> build, search and replace script, indexing, backup, Jet compile,
> program load, source code tidy, email fetch, FTP upload, macro
> expansion to regenerate my website ....
>
> The problem is these often interfere with my foreground work. I hit a
> key and nothing happens for several seconds. I find it quite hard to
> type word without the instant visual feedback.
>
> The background task may be hogging the CPU or the disk. Back in the
> 60s I learned about what OS's were supposed to do to ameliorate this,
> giving higher priority to i/o bound tasks and higher priority to tasks
> a human was sitting there waiting for.
>
> I am using Windows 7 on a dual CPU which was orders of magnitude
> resources to play with that the computers of that day, but it does not
> seem to be doing all that well.
>
> So some questions:
>
> 1. Is there anything I can do to make my OWN background Java apps
> better behaved, to notice disk or CPU is tight and back off? or lower
> their priority to CPU or disk?
>
> 2. Is there anything I can do to configure some sort of allocation of
> the CPU and disk where various combos of app are running?
>
> 3. Is there anything I can do quickly when my computer is sluggish to
> throttle but not kill the culprit?
>
> 4. Do Linux people fare any better? I imagine most windows users have
> programs in the background, but they would nearly always be idle. This
> problem is likely not high on the MS priority list.


Unix/Linux has nice.

OpenVMS has set process/priority

Windows has solitaire.

(Couldn't resist that)

Try looking at http://xona.com/2004/07/22.html

Jeff Coffield

 
Reply With Quote
 
Tassilo Horn
Guest
Posts: n/a
 
      11-24-2011
"Jeffrey H. Coffield" <(E-Mail Removed)> writes:

Hi!

>> 4. Do Linux people fare any better? I imagine most windows users
>> have programs in the background, but they would nearly always be
>> idle. This problem is likely not high on the MS priority list.

>
> Unix/Linux has nice.


Yep, for CPU scheduling, and additionally ionice for IO scheduling. And
there are demons like verynice that can be used to automatically adjust
priorities for certain applications, e.g., compile tasks.

Nowadays, there're also control groups in the kernel that allow for
grouping processes and setting policies for them.

Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-24-2011
On Thu, 24 Nov 2011 16:27:30 +0100, Silvio Bierman <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>Is there a particular reason you run Windows?


It used to be because all my customers did and because I own so much
Windows software. I also figured anything I produced free, first and
foremost had to work on Windows.

Those reasons is not as valid anymore. I could simply test under
windows, but do the development in Linux.
--
Roedy Green Canadian Mind Products
http://mindprod.com
I can't come to bed just yet. Somebody is wrong on the Internet.
 
Reply With Quote
 
Knute Johnson
Guest
Posts: n/a
 
      11-24-2011
On 11/24/2011 8:41 AM, Roedy Green wrote:
> On Thu, 24 Nov 2011 16:27:30 +0100, Silvio Bierman<(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>
>> Is there a particular reason you run Windows?

>
> It used to be because all my customers did and because I own so much
> Windows software. I also figured anything I produced free, first and
> foremost had to work on Windows.
>
> Those reasons is not as valid anymore. I could simply test under
> windows, but do the development in Linux.


I recently did a project where all the development was done under Linux.
The program ran smoother and faster under Linux than it does under
Windows. My clients however have much faster computers and that made it
work fine on their machines too. I think Windows is just a resource and
processor hog and that Linux has a smoother interrupt and timing
environment.

--

Knute Johnson
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-24-2011
On Thu, 24 Nov 2011 09:24:12 -0800, Patricia Shanahan <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>On Windows, bring up the Task Manager, Processes tab. Look for the
>process you want to throttle. Right click it, and use "Set Priority" to
>give it a below normal priority.


That takes so long. Is there way to do it with a batch script or a
tiny utility?
--
Roedy Green Canadian Mind Products
http://mindprod.com
I can't come to bed just yet. Somebody is wrong on the Internet.
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      11-25-2011
On 11/24/2011 8:44 AM, Roedy Green wrote:
> I usually have at least one active background task going, e.g. defrag,
> build, search and replace script, indexing, backup, Jet compile,
> program load, source code tidy, email fetch, FTP upload, macro
> expansion to regenerate my website ....
>
> The problem is these often interfere with my foreground work. I hit a
> key and nothing happens for several seconds. I find it quite hard to
> type word without the instant visual feedback.
>
> The background task may be hogging the CPU or the disk. Back in the
> 60s I learned about what OS's were supposed to do to ameliorate this,
> giving higher priority to i/o bound tasks and higher priority to tasks
> a human was sitting there waiting for.
>
> I am using Windows 7 on a dual CPU which was orders of magnitude
> resources to play with that the computers of that day, but it does not
> seem to be doing all that well.
>
> So some questions:
>
> 1. Is there anything I can do to make my OWN background Java apps
> better behaved, to notice disk or CPU is tight and back off? or lower
> their priority to CPU or disk?
>
> 2. Is there anything I can do to configure some sort of allocation of
> the CPU and disk where various combos of app are running?
>
> 3. Is there anything I can do quickly when my computer is sluggish to
> throttle but not kill the culprit?
>
> 4. Do Linux people fare any better? I imagine most windows users have
> programs in the background, but they would nearly always be idle. This
> problem is likely not high on the MS priority list.


The core of this problem is not Java related.

AFAIK, the only thing you can control from Java is thread
priority via Thread setPriority - and I don't even know how
much effect setting it really would have on your problems.

Arne


 
Reply With Quote
 
Fistulina Hepatica
Guest
Posts: n/a
 
      11-25-2011
On 24/11/2011 6:36 PM, Roedy Green wrote:
> On Thu, 24 Nov 2011 09:24:12 -0800, Patricia Shanahan<(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>
>> On Windows, bring up the Task Manager, Processes tab. Look for the
>> process you want to throttle. Right click it, and use "Set Priority" to
>> give it a below normal priority.

>
> That takes so long. Is there way to do it with a batch script or a
> tiny utility?


The information at http://xona.com/2004/07/22.html (which another user
posted elsewhere in this thread) suggests how to start a process (such
as a JVM) with priority reduced from the outset. I'd guess that
/abovenormal, /high, and /realtime could also be used to start a process
with elevated priority (say, an I/O bound task you want to remain very
responsive).
 
Reply With Quote
 
thoolen
Guest
Posts: n/a
 
      11-25-2011
On Nov 24, 10:01*pm, "Manh Tuong Lewis Nguyen", an obvious murphy
sock, wrote:
NaN> Newsgroups: comp.lang.java.programmer

NaN> making a fist of a guess, "seamus" Derbyshire, is no
NaN> enhancement of your plagiaristic dumma than a box
NaN> of rocks subterfuge attempts.

Who is "seamus Derbyshire", murphy? There is nobody in this newsgroup
using that alias. And what does your non sequitur have to do with
Java, murphy?

NaN> "seamus" Derbyshire records updated follow -

Who is "seamus Derbyshire", murphy? There is nobody in this newsgroup
using that alias.

NaN> names are missing as I aint so skilled as the "Murphy".

What does your classic contradiction have to do with Java, murphy? You
can't be less skilled than yourself, murphy, despite being very low in
skills in any absolute sense.

"I had 'volunteered (years back) to support those who do endeavor
to provide free Free Usenet access, support those who offered
subscription based Free Usenet access, nothing more than
cooperation expected in return for what has been many
thousands of hours of work. I note most of those I joined with
are either deceased, severely disabled, or plain ole' MIA..
now it is my Time. ...

You just read my last. ...

For those who think they see me in future times I can only wish
you severe Tinnitus in your dreams. For those who know me
well (eMail, whatever) and see me, know I will be smiling also.
It is to you I say "adieu mein frenz and adios .. grazie' [hugs]
for all the Good Times! May you and yours always bear well
with all Life brings you".

/0ut"
--murphy

http://www.uffnet.com/kookkamp/goodbye.htm

And some people wonder why I call them Famous Last Words.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Toward more extensive use of final Roedy Green Java 17 03-08-2006 11:40 AM
CAN I COUNT 70-305 TOWARD BOTH MCSD AND MCDBA? IGNACIO DE LA TORRE MCSD 1 04-29-2004 11:35 AM
"Working Toward MCSE" Jon Anderson MCSE 17 04-23-2004 01:06 AM
Will 70-216 Count Toward My MCSA? Jim Bayers MCSE 2 01-26-2004 08:16 PM
Toward more efficient ArrayLists Roedy Green Java 10 07-03-2003 01:18 PM



Advertisments