percent cpu

breed at almaden.ibm.com breed at almaden.ibm.com
Mon Sep 21 10:01:32 PDT 1998


It's the threading. The JDK uses green threads, which really suck!
Basically when a thread blocks on IO, the vm will switch to another thread,
but the first thread will stay "runnable", so when the first thread's turn
comes to run, the vm will try the I/O again.  Thus if you are blocked on
I/O, the vm is spinning trying to do the I/O.

Kaffe on the other hand marks the thread as blocked and waits for the OS to
tell it that there is some I/O to do.  Thus when blocked on I/O, kaffe uses
no CPU time.

ben


John Carnahan <johnc at dent.ucla.edu> on 09/21/98 09:38:19 AM

Please respond to kaffe at rufus.w3.org

To:   "kaffe at rufus.w3.org" <kaffe at rufus.w3.org>
cc:
Subject:  percent cpu





To all,
Just curious. Does anyone know why kaffe, when running some big cpu
suckers, utilizes very little cpu time? Using jdk on the same
application uses up all available cpu time (~90%) while kaffe sits at
around ~10%. Is the vm itself doing some backgorund nicing? Is there any
way to control this (feature)?
John







More information about the kaffe mailing list