----- Original Message ----- From: "Signal 11" <signa...@mediaone.net> To: <freenet-dev at lists.sourceforge.net> Sent: Thursday, August 24, 2000 11:15 PM Subject: RE: [Freenet-dev] Throttling bandwidth (was: size limits)
> > It would be nice to be able to throttle CPU, too. That seems like an even > > trickier issue. Come to think of it, I have no clue how this would be > > achieved. People have been complaining, though, about the 90% CPU usage > > when a file is being transferred. > > Under linux, any process can lower its priority to up to 20 and be > unpriveledged. It is raising it back up that is a problem. doing a > fork-and-exec would let you control the cpu usage alittle better... > possibly using the STOP and CONT signals as well if you need finer > control during periods of high congestion. Yes, it's a hack, but > it is probably portable between most all modern unixes... > > ~ Signal 11 It doesn't need to be done on a process level at all. Just dropping the thread priority to as low as it can go should work just as well under any modern system with threads. Threads should be implemented outside of the java VM, and will instead let the OS or a usermode threading under the OS take care of it. Threads under this system will be run with threads from other processes which are running. On a coding standpoint, we can make a new thread and setPriority(). Just to be nice, we should stick them all in a ThreadGroup so they can be killed quickly and easily (I'm not sure how the current code is implemented. Haven't looked into the whole EThread part yet) Still just my $0.03 (3 cents isn't worth what it used to be) Mathew Ryden _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev