Cooler, faster SwingWorkers

Do you remember our experiment with Amdahl's Law? Do you remember Jeffrey's table with the results of running a Swing, multi-threaded, application in a dual core system? (He measured a reduction in running time in those tables in his dual core box). Do you remember when I talked about Herb Sutter (of C++ world fame) urging people to go multithread?.

Well, the fact is that the time has come for us to be able to run up to 32 simultaneous threads within a single chip. It's not dual core, but dual-dual-core. This is, it contains four cores. It's not hyper-threaded, but hyper-hyper-hyper-hyper threaded. Each one of those four cores can run eight threads. That means that you can run 1+1+1+1+ 1+1+1+1+ 1+1+1+1+ 1+1+1+1+ 1+1+1+1+ 1+1+1+1+ 1+1+1+1+ 1+1+1+1 threads at the same time.

That-is-impressive. I'm delighted. But wait, there's more. For those of use worried about Global Warming news are even better. The beast runs with a low power consumption. Since high frequency signals don't have to travel long distances out of the chip, there's little radiation overhead (well, there're much more technical reasons for low power consumption, of course). I've got a bulb around consuming 60 Watts. The chip consumes just 73 Watts. Probably less than this Intel Pentium IV I'm running now. (By the way, I've been trying to find about Pentium processor power consumption without success, has anyone got any details on this? A comment would be greatly appreciated).

I think today is a great day for Sun and for us enjoying multithreading. (And well, of course, for all Sun customers wishing to save some bucks in the elecricity bills and in real state bills. There's even a savings calculator here.)

Now I'll start saving those $3000 to buy one of those boxes. Or, even better, I'll try to think about a good idea for the coolthreads project at java.net, so that I can earn some cash and get one of those flipping servers. What about reading 32 RSS feeds at once and caching them? (Oh, well, that's just what bloglines does).

Any ideas, anyone?
Thanks,
Antonio

Comentarios:

Power consumption: I'm using always this table.
It's german (choose "Desktop Prozessoren"), but i think you will understand that table. :)
http://www.pc-erfahrung.de/cpu_tabelle.php

Enviado por Ingo Siebert en diciembre 07, 2005 a las 01:20 AM CET #

Hi Ingo,

Thanks for the link. Quite interesting. Amazingly Pentium IV 2.5GHz (Pentium IV B?) consumes 59.3 Watts (and different others can consume up to 100W).

How are you doing?

Cheers,
Antonio

Enviado por Antonio en diciembre 07, 2005 a las 02:09 AM CET #

Not to argue with the whole thing Antonio, but isn't there at some point a point of deminishing returns on so many threads? While it might be possible to use 32 threads for something (such as multithreaded server services), that doesn't mean its a good use of those 32 threads or even a proper use of them all in general? A possible poor example would be looking at parallized sorting algorithms. Take a bitonic sort(http://www.iti.fh-flensburg.de/lang/algorithmen/sortieren/bitonic/bitonicen.htm) for instance, a lot of people know it because you can parallize it and its pretty cool in general (part of that geek factor thing I think), but its really not that much better to use then other sorts in general.

I guess what I'm trying to say is there are points where a good deal of threads are worth it and great to have (like calculating the thermal tempurature of ocean currents, and that...) where you need a->[1,2,3,4...n]->b, but others where somethings just going a->b for example, it makes little sense to me... As of yet.

That said, having taken some interesting classes while in Uni on the subject, I try to find places where we can benefit from such abilities at work where others don't see the possiblities as of yet. I also strive to find projects where I can play with such things on my own, I'm just looking for the mother of all reasons to purchase a quad core box to use. Sorry if this is confusing, I'm pretty sick and just got back to work this week from it. :(

Enviado por Jeffrey Olson en diciembre 08, 2005 a las 09:51 AM CET #

Hi Jeffrey,

Well, if I had a box with 32 threads I could run OpenOffice in one thread and Java in the 31 other threads! ;-)

Now, seriously, if I had 32 threads in my desktop then I could use 30 threads to fetch RSS feeds, for instance. So my RSS feed readers (if programmed with threads) should be faster. Or, say, a software that performs JDBC queries could benefit of that (if programmed with threads) to run queries in each threads and make things faster. Firefox and mozilla and mail readers should also be faster, because those use threads to fetch web pages and mail. Even NetBeans would be faster, because it uses threads for lots of things (such as code completion)!

I'm still thinking of good ways to exploit those 32 threads. But if I find something \*really\* innovative I think I'll go to https://coolthreads.dev.java.net/ and wron a prize for that! ;-)

I hope you get better. Take care,
Antonio

Enviado por Antonio en diciembre 09, 2005 a las 02:07 AM CET #

Now thats something interesting I hadn't really thought about, threading jdbc queries... Have you done that much? Are you talking about only on GUI apps? Could it be applied to web app's as well?

As for the other part of the convo, yea I get the general idea, but in general as it stands, most software can't use that many threads correctly, or in a worthwhile way. And as for a 30thread rss read... Oye, you got some good rss items? Cause right now outside of this and things like blogs.sun.com, I dont, lol! ;)

Enviado por Jeffrey Olson en diciembre 12, 2005 a las 07:36 AM CET #

Enviar un comentario:
Los comentarios han sido deshabilitados.
About

swinger

Search

Archives
« abril 2014
lunmarmiéjueviesábdom
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Hoy