Re: Question about memory size and performance
Endre Stølsvik <[email protected]> Tue, 11 Dec 2007 12:45:36 +0100
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
Attila Szegedi wrote: > Yeah, that'd be great -- a GC could then first try to free enough memory > to satisfy an allocation request within the loaded pages, not triggering > a page fault, and only GC in non-loaded pages when it can not free > enough from the loaded pages. Would definitely make sense. The beauty of > virtual machines is of course that as soon as it gets implemented, all > code will benefit from it :-) The communications between the kernel and the GC could be even tighter: "Kernel: dude, I'm really in bad need of some memory now, could you please free some? You don't REALLY need those 1.5 gigabytes, do you?" "Kernel: Okay, so Rome is burning, and I'll evict some of your stash now - have any preferences, do you?" "Process: I'd like to really fatten up - but how much may I ask for and still not go into The BadLands?" (aka Swap). .. and possibly others. I agree: since this is VM, everyone will benefit if it suddenly is fixed. It would benefit all JVM implementations similarly. And I don't think that one will have to change all OSs' kernels only due to Java - all GC'ed languages must have the same problems, so all such languages could benefit from these hooks and info from the kernel. But then, Sun haven't seem to keen on talking with the Linux kernel guys on other topics. I find the following bugs very annoying, making smooth GUI applications with lots of background activity on Linux difficult: Thread Priorities on Linux: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6495300 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813310 ---------- Fixed by using setpriority() in root mode. To use thread priority on Linux, the application needs to run as root *and* -XX:ThreadPriorityPolicy=1 is set on the command line, otherwise thread priorities are ignored. Posted Date : 2005-10-05 18:12:53.0 ---------- So, you must be root to get the goods. Why not instead talk to the Linux Kernel folks, providing a patch or ideas, and simply get the feature in? Regards, Endre. =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com