Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Java 1.5 pauses my PC for some seconds regularly  (Read 9021 times)
0 Members and 1 Guest are viewing this topic.
Offline jfeldman

Innocent Bystander




Java games rock!


« Reply #30 - Posted 2005-01-13 02:45:21 »

Sad  JVM 1.5 has some bad strategy for memory allocation. I run my  ???JSP-java classes under Apache-Tomcat 4.0,4.1 and work under NetBeans 4.0

All cases show the same effect. Netbeans/TomCat pauses everything for 2 second and after that I see in TaskManager memory growth during 7-10 second. No graphic actions, no devices, nothing, only memory allocation for java1.5. Tomcat with java 1.4.-1.4.2 takes maximum 18M RAM. Tomcat with java 1.5.0 takes up to 70M RAM. NetBeans takes up to 150M! (NetBeans with java 1.4 takes up to 70M RAM)

So it depends on memory allocation only! Any ideas ho to manage it?
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #31 - Posted 2005-01-13 17:14:06 »

I guess your problem is related to a bad default GC egonomic parameter. Try setting a GC parameter to tune the memory. It seems to be a Java 5 bug since it's relativly young and therefore not very mature. See performance docs on javasoft.com particularly the one on GC.

Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #32 - Posted 2005-01-17 06:29:15 »

Why don't I have this problem?

Java 5 runs faster than 1.4.02.
Eclipse and Netbeans have instant response times.

I have an Athlon64 3000+, 1GB DDR400 RAM, nForce 3 mobo, Radeon 9700 Pro.

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »


Medals: 437
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #33 - Posted 2005-01-17 09:42:24 »

LOL! Probably because your machine is fast as hell anyway!

Cas Smiley

Offline sonicviz

Senior Newbie





« Reply #34 - Posted 2005-01-17 23:33:21 »

Quote


Well, I have an WinXPsp2 AMD64 3200+, 512MB RAM, NVIDIA 5900XTV box and this "problem" is giving me the $&#*(ing ($*#s!

I'm using Eclipse and quite regularly it will pause (say Not Responding in task manager) and then go on a memory feeding frenzy (280mb to 360mb).
I cut down the number of projects in my workspace which helped somewhat but it still occurs.

Is there any way to tune this at all?
It REALLY interrupts workflow, especially when you are in the rhythm of a test/fix cycle.

thanks,
pc
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #35 - Posted 2005-01-18 10:51:30 »

I guess an easy workaround for now would be to run eclipse with java 1.4.2 and running your apps with 1.5.

Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #36 - Posted 2005-01-18 12:16:28 »

Quote

I'm using Eclipse and quite regularly it will pause (say Not Responding in task manager) and then go on a memory feeding frenzy (280mb to 360mb).


That's the problem right there. Imagine how much memory is left for Windows and then used up by other tasks.
Java's GC would be going insane trying to make headroom for Java apps.

I have an incredibly large workspace going into the MB, Eclipse uses at most about 90MB RAM after several hours of work.

I don't know why it would use that much on your PC.

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #37 - Posted 2005-01-18 18:56:00 »

This will look like attempt to copy all memory space to some unallocated place at once, then using different memory. What flags are you using for Eclipse? What version of Eclipse are you using?
And other important question: Do you have installed drivers for your mainboard? (For example for HD controller, and AGP.)
Of course it might be nice to let print all GC calls on console and also a compilation messages.
Offline K.I.L.E.R

Senior Devvie




Java games rock!


« Reply #38 - Posted 2005-01-18 22:14:58 »

No flags, Eclipse 3.1M4 uses Java 1.5.
A few days before that I was using the official 3.0 release.

Yes I have installed all the latest drivers for my entire PC.

Quote
This will look like attempt to copy all memory space to some unallocated place at once, then using different memory. What flags are you using for Eclipse? What version of Eclipse are you using?
And other important question: Do you have installed drivers for your mainboard? (For example for HD controller, and AGP.)
Of course it might be nice to let print all GC calls on console and also a compilation messages.


Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline Azeem Jiva

Junior Devvie




Java VM Engineer, Sun Microsystems


« Reply #39 - Posted 2005-01-19 00:59:46 »

Try grabbing Java5 update 1 from http://java.sun.com.  That might fix your problem.  

As a side, I'm running Eclipse 3.1M4 on my machine (AthlonXP 3200+, 1gb memory) and I never see it trash.  I'm running the standard Java5 as well without problems.  
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sonicviz

Senior Newbie





« Reply #40 - Posted 2005-01-19 03:05:58 »

I moved to update 1 and Eclipse 3.1M4 after my rant :-)

Seems a lot better, thank you for the suggestions.

thnx,

update: it still happens, but not as bad...
Offline princec

« JGO Spiffy Duke »


Medals: 437
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #41 - Posted 2005-01-19 10:59:19 »

It's still completely jerk-tastic here.

Cas Smiley

Offline Azeem Jiva

Junior Devvie




Java VM Engineer, Sun Microsystems


« Reply #42 - Posted 2005-01-19 14:24:05 »

Quote
It's still completely jerk-tastic here.

Cas Smiley



Get more memory Smiley  Or tweak your heap usage (maybe -Xmx256m)
might help here.
Offline princec

« JGO Spiffy Duke »


Medals: 437
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #43 - Posted 2005-01-19 14:46:51 »

This is nothing to do with paging. I've got a gig of RAM and it's not even close to swapping. Nor has the VM even gotten close to its max heap allowance. I want to know why my mouse pointer jerks like anything. If there's one thing that shouldn't get unresponsive it's the mouse.

Cas Smiley

Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #44 - Posted 2005-01-26 17:15:30 »

So did anyone found a reason for that shutter?
Just currious.

"In order to prevent VRAM from being lost during access to a surface, DirectDraw holds the Win16 lock between Lock and Unlock operations. The Win16 lock is the critical section used to serialize access to GDI and USER. Although this technique allows direct access to video memory and prevents other applications from changing the mode during this access, it will stop Windows from running, so Lock/Unlock and GetDC/ReleaseDC periods should be kept short. Unfortunately, because Windows is stopped, GUI debuggers cannot be used in between Lock/Unlock and GetDC/ReleaseDC operations."

So for start we might try to disprove this.
Then we might look what in common have that computers with shutter.

cas do you have dual CPU system? Does it behave as badly on your other computers? Are you using the Eclipse with the SWT, or with the Swing?
Offline sonicviz

Senior Newbie





« Reply #45 - Posted 2005-01-27 20:12:30 »

I've found the same problem, but it is intermittent.
I'm tracking it to try and reproduce it, as it seems to happen after I've been using eclipse for some time.

I'm not sure if it's related, but I've noticed it starts to happen when I'm also concurrently using firefox that runs a bunch of applets as part of a tutorial of the projects api I'm working on.

and it's &$*$ing annoying...
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #46 - Posted 2005-01-29 03:55:32 »

To see if windows lock causes this stuttering, try this flag:
 -Dsun.java2d.ddlock=false

Offline princec

« JGO Spiffy Duke »


Medals: 437
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #47 - Posted 2005-01-29 09:27:55 »

Eclipse doesn't use AWT. The problem appears to be related to garbage collection - as if some global system lock is being obtained during collections.

Cas Smiley

Offline Raghar

Junior Devvie




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #48 - Posted 2005-01-29 18:49:53 »

Quote
Eclipse doesn't use AWT. The problem appears to be related to garbage collection - as if some global system lock is being obtained during collections.


Of course it depends on instalation. If you'd like to use Swing in Eclipse you could download the right one. (could it be this one? :http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.0.1-200409161125/eclipse-SDK-3.0.1-linux-motif.zip) I listened there were problems with one of BitTorent client. When I looked at its main page there was a sentence it uses SWT.
Dunno if related, or not.

BTW what happened after you used "-Dsun.java2d.ddlock=false
" ?
Offline Bombadil

Senior Devvie





« Reply #49 - Posted 2005-12-05 09:59:37 »

Looks like finally this nasty thing has been fixed in Java 1.5.0_06.
Please have a look at here: http://www.java-gaming.org/forums/index.php?topic=11624.0
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (79 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (97 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (152 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!