Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  hyperthreading and stuff  (Read 3865 times)
0 Members and 1 Guest are viewing this topic.
Offline Raghar

Junior Member




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


« Posted 2003-07-20 19:28:55 »

It seems the lots of people are scared to have more than one thread, wonder why?

Actually I'm curious if anyone have hyperthreading computer, or dual processor one? And how looks JVM on it? Stop the world as always  Wink or some nice smooth... well you get the idea.
Offline shawnkendall

Senior Member





« Reply #1 - Posted 2003-07-20 23:33:24 »

My experience of multiple processor machines and Java has been great.  The multi-threading splits out great by the VM on Windows2000.

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline princec

JGO Kernel


Medals: 361
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2003-07-21 09:40:18 »

Dual processor NT systems running Java are really nice. You only get about 5-10% performance increase by splitting rendering and logic up into two threads but the garbage collection pauses completely vanish if you use parallel incremental collection.

In fact I'm about to do some more live TV graphics, and we run our rendering server on a Win2k dual 1GHz box so we don't get any dropped frames.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Archimedes
Guest
« Reply #3 - Posted 2003-07-21 13:14:04 »

Multi-threading Java applications do work very well on multi-processor systems, in case you removed all deadlocks and that like. :-)
This I mean generally for "normal" applications; I can't comment on Java games (but basically they're applications, too.)
The IBM OS/390 mainframe we worked at did have about a dozen CPUs and each of our JDBC database queries got its own Java thread and therefore its own CPU - wow. :-)
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #4 - Posted 2003-07-21 15:53:15 »

Quote
The IBM OS/390 mainframe we worked at did have about a dozen CPUs and each of our JDBC database queries got its own Java thread and therefore its own CPU - wow. :-)


... all synchronized to access one single disc/network adapter :)


HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #5 - Posted 2003-07-21 18:46:32 »

Quote


... all synchronized to access one single disc/network adapter :)



That seems kind of silly. Processors are expensive. Disk and network cards are cheap. I seriously doubt you'd have a machine with a dozen processors that doesn't use at least two to three network adapters + an array of disks. Quite common to have hundreds of gigs of storage spread across 30 or so disk drives. If the database is worth its salt, it's probably trying to spread its data across as many of those disks as possible.

Now if everyone wanted to update the exact same record of a given table, then you might have a problem.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Raghar

Junior Member




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


« Reply #6 - Posted 2003-07-23 21:43:15 »

It's nice. I like hyperthreaded games. Actually I would need to get multiprocessor computer somewhere.  
No stop the world GC is wonderfull thing.

BTW how many threads is possible create on Win 2000 and on XP? Threads are somehow limited on 98SE.

Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #7 - Posted 2003-07-23 21:47:39 »

I can see it now:

System Requirements

Intel Pentium IV or AMD Athlon 2100+
TWO OR MORE PROCESSORS REQUIRED
Windows XP
blah blah blah blah blah....

Then again, compared to the hardware 20 years ago, maybe in 20 years dual or quad proc machines are standard.

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #8 - Posted 2003-07-24 01:07:54 »

The last 3 windows computers I've had have been dual processor (gotta love it when work supplies you with a home computer), and from the looks of it dual processor Macs are quite common too.

We do Windows 2k/XP device drivers at work and dual processors are required for proper testing of the kernel mode code.

If you want to be really fancy, detect the number of processors at runtime and have two different versions of the main loop.. a single thread version and a multithreaded version..ooooh.  

Offline princec

JGO Kernel


Medals: 361
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2003-07-24 07:20:08 »

Tried that; wasn't worth the effort in the end really. Just let the other processor do the garbage collection and take care of OS functions and other processes.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #10 - Posted 2003-07-24 11:50:31 »

Cas,

Did you have to do anything specific to achieve that division of labor, or does the JVM decide for itself how to use the processors?

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline Raghar

Junior Member




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


« Reply #11 - Posted 2003-07-24 20:04:14 »

Quote
If you want to be really fancy, detect the number of processors at runtime and have two different versions of the main loop.. a single thread version and a multithreaded version..ooooh.  

This would be overkill. I think much better is let OS decide thread sheduling and stuff with just some hints. This way you could benefit from improved OS when user would update his Linux kernel Wink
Dual hyperthread has 4 logical processors at least on the Win XP pro and on the Linux. So I would say this should be a low end platform.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #12 - Posted 2003-07-25 01:29:44 »

It wouldn't be overkill - it would be required!

Without multiple threads there won't be a lot off work for the other processor to do, other than as PrinceC said, hidden OS threads and GC stuff.. what I would call 'incidental threads'.. you need a multithreaded program to really give the extra CPUs some serious work to do.

You are always at the mercy of the OS in terms of thread scheduling.. that wasn't the point.  The point was to give it some threads to schedule.  I hate waiting for a computationally intensive task to complete while I sit and watch my CPU usage at 50% (maxing out 1 of 2 CPUs) because the program wasn't multithreaded.

But I agree for games it is rarely worth it..maybe if you were making a chess engine or something and had some parallelism in your move search algorithm.

Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #13 - Posted 2003-07-25 09:46:04 »

I'm dubious whether multiple CPUs will *ever* become mainstream.
Additional, more specialised processors will ofcourse become more common (a Generic AI chip? Shocked), but until we reach the speed limitations of silicon I can't see parrellel CPUs becoming the norm.

thoughts?

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #14 - Posted 2003-07-25 12:12:02 »

I thought we WERE reaching the limits of silicon?

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #15 - Posted 2003-07-25 15:22:27 »

Well like I said, for me they are already the norm.  I haven't seen any number with respect to Macs, I suspect the ration of multiprocessor machines in the Mac world is higher than the Windows world.. but of course the Mac world is already so small Sad

I just looked around me and I see 3 dual processor machines on my desk (2 windows, 1 linux). My laptop is one of the few single processor machines I can see in the room.  (I'm at work)

For a multi-tasking OS they rock.

Offline Raghar

Junior Member




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


« Reply #16 - Posted 2003-07-25 20:17:20 »

Quote
It wouldn't be overkill - it would be required!

Without multiple threads there won't be a lot off work for the other processor to do, other than as PrinceC said, hidden OS threads and GC stuff.



I ment, there is no reason to do a single threaded version. What for?

I used halfcript and there wasn't any idea of single threaded aplications in halfscript, except for processor killers. For halfcript programer is doing single thread aplication something like writing single object aplication for OO programer. It might be doable, that second part, but why. EECK.


Offline tortoise

Junior Member




<3 Shmups


« Reply #17 - Posted 2003-07-25 22:19:42 »

Quote
I haven't seen any number with respect to Macs, I suspect the ration of multiprocessor machines in the Mac world is higher than the Windows world..


Apple's top of the line PowerMac has been a dual processor machine for some time now. Motorola initially had some issues pushing the powerpc over 1ghz, so this was Apple's answer to the problem (I believe dual 800mhz g4 was the first one).

But even so, top of the line Macs cost about the same as a sedan or small house, so I doubt many are actually out in the wild.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #18 - Posted 2003-07-25 23:31:48 »

Quote
I ment, there is no reason to do a single threaded version. What for?


It's usually easier.  No need to mess around with synchronization or debug deadlocks.

Offline Captain-Goatse

Junior Member




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #19 - Posted 2003-07-31 17:49:39 »

Well, more often you waste that 5-10% speed increase with syncronization, which is too bad. Hyperthreading, hyper syncing.
Offline bmyers

Junior Member





« Reply #20 - Posted 2003-08-01 14:52:03 »

I don't think synchronization (using the synchronized keyword) is anywhere near 5-10% of CPU usage.

It used to be somewhat high (16 ms)? in Java 1.0 or 1.1.  But I believe it has gone down significantly in Java 1.2.  I don't have any benchmarks to support this claim, however...

Plus, you have neglible overhead if you already own the synchronization lock.  The actual sync overhead is grabbing the lock.

On the other hand, debugging deadlocks and other threading bugs *is* a lot more work... Tongue

Offline Raghar

Junior Member




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


« Reply #21 - Posted 2003-08-03 22:53:18 »

Why syncronise too much? Once per while is enought in most cases. Using too much syncronise, when you are sure syncronisation should be just on start and possible without syncronise keyword, is harmfull.

BTW Java uses lazy syncronisation so if you accidentaly overuse syncronise, it wouldn't have much effect on
your program.


I think AI should be done in different thread than graphic, if for nothing else than for calculations in free computer time. Two and more processors should be very nice for this. First quick and dirty analysis, just in case. Then more detailed and highly smart one. I could imagine that such programs would run incredibly calm on more processors.

What about graphic. Did anyone tried multithreaded graphic?
Offline Golthar

Junior Member




;)


« Reply #22 - Posted 2003-08-13 11:19:49 »

So, will hyperthreading help with GC pauses..
Any experience on that (I got myself a new setup, but I don't have time for any testing for now)

come visit us: http://www.otf1337.com
Offline princec

JGO Kernel


Medals: 361
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2003-08-13 17:19:13 »

Maybe, maybe not - depends what sort of GC pause it is.

Cas Smiley

Offline kemalenver

Senior Newbie




null pointer exception


« Reply #24 - Posted 2003-08-13 21:59:43 »

Quote
I'm dubious whether multiple CPUs will *ever* become mainstream.
Additional, more specialised processors will ofcourse become more common (a Generic AI chip? Shocked), but until we reach the speed limitations of silicon I can't see parrellel CPUs becoming the norm.

thoughts?


Ahhhh, a generic AI chip.  If only  Embarrassed
Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #25 - Posted 2003-08-13 22:06:43 »

Quote


Ahhhh, a generic AI chip.  If only  Embarrassed


Go look in the mirror for proof its possible Wink

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Pages: [1]
  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.

atombrot (21 views)
2014-08-19 09:29:53

Tekkerue (21 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (56 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (35 views)
2014-08-06 19:49:38

BurntPizza (65 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!