Why Parallel Processing? Why now? What about my legacy code?

by Tom Spyrou on Monday 31 August 2009

Many software companies have applications which are in use by their customers that have significant runtime and for which fast runtime is a necessity or a competitive advantage. There has always been the pressure to make such applications go faster. Historically, as processors have increased their speed, the needed speedups could often be achieved by tuning the single cpu performance of the program and by utilizing the latest and fastest hardware. In the Electronic Design Automation industry that I am a part of, it has always been the case that the newest machines had to be used to run the design tools which were being used to design the next generation of processors. The speed and memory capability of the newest machines had always been just enough to design the next generation chips. Other types of cpu intensive software have also ridden the hardware performance curve in this way.

We will no longer see significant increases in the clock speed of processors. The power consumed by the fastest possible processors generates too much heat to dissipate effectively in known technologies. Instead processor manufacturers are adding multiple processors cores to each chip. Why does this help? Power Consumed = Capacitance * Voltage^2 * Frequency. If a given calculation is perfectly moved from a processor running at N Gigahertz to 2 parallel processors running at N/2 Gigahertz where does the savings come from? It would seem that each processor runs in half the power but now there are 2 processors which would mean that the same power is used. The power savings comes from the fact that slower processors can run at a lower voltage. For example a processor running at half the frequency can run at around 8/10 the Voltage level. .8^2 is .64 which implies a 36% power savings. If you scale this up to 32 cpus then it will be possible to get a lot of compute power for much lower power consumption and therefore much lower required heat dissipation. Eventually it seems that even cell phones and other embedded devices will move to multi core processing for this reason. More compute capabilities or longer battery life for the same capabilities. Both are compelling values.

Part of the assumption that goes into the definition of how this power savings will be achieved is that the software implementation of the parallel program running on the 2 slower processors must be perfectly efficient. Well, nothing in the real world is perfectly efficient. Even if the coding is not perfectly efficient, as long as it is reasonably efficient, then there is a benefit. If the parallel coding is inefficient, then it might be that the parallel program will use more power on the slower processors than the serial program running on the fast single processor. However, since faster processors that won’t melt can no longer be made, we are kind of stuck with going parallel and need to do our best.

I say stuck because from a software development perspective a large new burden is being placed on software developers. That burden is to write programs that are as efficient as possible and which make use of N processors, hopefully where N is configurable by the user and can be increased as new processors chips with more cores become available. For most developers this is something really new and really complex. It also presents a huge discontinuity for software companies with large investments in legacy code.

I joined the company I work for in 2006 with the job of parallelizing a product with 6 Million lines of code developed over 10 years and which is made up of dozens of very complex intertwined algorithmic steps. I wanted to write this introductory blog because I haven’t seen the path to where we are and the need for parallel programming described from the big picture. I plan to write a few blogs going forward on the problem and some solutions for parallelizing legacy code. The solutions will work in some cases and will parallelize programs to some degreee but not perfectly. In the end software developers are engineers and need to make engineering trade offs. Please check back on this blog for some tricks of the trade in parallelizing legacy code. I have been able to get around a 2X speedup on 4cpus for this 6 Million line code base. Good but a lot more to do. I am hoping to help others by sharing and also look for new ideas from smart and innovative people that I hope will joing in the discussion.



Can developers survive in Android Market?

by Jason Ankeny on Monday 31 August 2009

Half of iPhone users and 40 percent of iPod Touch owners download one or more premium applications each month, compared to 19 percent of Android smartphone users, according to mobile advertising network AdMob’s July 2009 Mobile Metrics Report. That translates to about 26.4 million iPhone users and 18.6 million iPod users purchasing software from Apple’s App Store, compared to just 5 million users downloading paid apps from Android Market–according to AdMob, the disparity in revenues between the two platforms is even greater, with iPhone and iPod touch apps generating a combined $198 million revenues each month, and Android Market yielding just $5 million monthly.

While the number of applications available via the App Store continues to dwarf Android Market’s inventory, the enormous revenue schism between the two storefronts is still alarming. Here’s another shocker: Android developer Larva Labs speculates that AdMob’s Android revenues estimates are probably a bit high. Writing on the firm’s blog, co-founder Matt Hall admits Larva Labs’ Android app revenues averaged just $62.39 per day in August–”very difficult to buy the summer home at this rate,” he adds. Larva Labs’ apps aren’t exactly languishing in obscurity, either: “Our two best selling games have been ranked and are currently ranked pretty highly on that hard to find list of paid apps,” Hall notes. “RetroDefense was #1 for a while and is currently around #12 with a perfect 5 star rating. Battle for Mars is currently #5 overall with a 4.5 star rating. Both of these games are selling for $4.99, which is on the upper end of the price range. Finally, both of these games have been featured by Google in the market app and on the Android website.”

Nor is Larva Labs the lone developer struggling to break even in Android Market. Hall cites the example of Demiforce’s hugely successful iPhone puzzle game Trism, which raked in more than $250,000 in its first two months in the App Store. So Demiforce ported Trism to Android Market, where the title has sold fewer than 500 copies to date. “That’s $1,046 total earnings, max,” Hall contends. “How psyched are those guys that they ported a huge hit to Android and can’t even cover a party sub for the release dinner? By comparison, if you were an iPhone developer with a game in the #5 spot, you’d likely be earning around $3,500 a day (based on recent numbers from tap tap tap).”

It’s anyone’s guess whether Larva Labs’ experience is typical of the average Android developer’s struggle, but Hall speculates that given RetroDefense and Battle for Mars‘ respective positions on the bestseller list, the firm is probably on the high end of the earnings curve. Although Hall points to a number of fundamental flaws undermining Android Market’s potential–the absence of app screenshots, failed and stalled downloads, and credit card verification delays among them–the relative scarcity of Android devices appears to be the primary culprit behind its negligible download rates, and until more Android smartphones hit retail, the situation is unlikely to improve. “I’m sure Android will be on a lot of phones at some point in the future,” Hall concludes. “Whether it’ll be possible to target it profitably as a small developer, I’m not sure.” Me neither. -Jason



Analyst: Snow Leopard could extend iPhone battery life

by Jason Ankeny on Monday 31 August 2009

Apple released Mac OS X 10.6 (codenamed “Snow Leopard”) on Aug. 28, and while the upgrade targets the desktop environment, analyst Carl Howe–director for Yankee Group’s Anywhere Consumer research group–contends it will also result in dramatic battery life improvements in future iterations of the iPhone. According to Howe, Snow Leopard boasts a feature called Grand Central Dispatch that promises a new method of coding applications for optimization across one or many processors. “It’s one of those programming abstractions that makes it significantly easier for app developers to write software for multi-core systems without all the attendant race conditions and latent bugs that belie today’s thread-based programs,” Howe writes. “Snow Leopard applications like the Finder and Mail use Grand Central Dispatch a lot; it’s one of the features that makes the system feel so much snappier than your garden-variety 10.5 Leopard release, particularly since all current Macs have multiple processing cores. Apple also is encouraging all developers to use GCD in their third-party apps for the same reason… So what does this have to do with the iPhone? It’s simple: It suggests we’ll see iPhones with multi-core processors and apps built for those multi-cores sometime in the next year or two.”

While Howe notes that most smartphone functions don’t require multiple processor cores, the technology’s true promise lies in its impact on device battery life. “The problem is that power consumption increases with processor clock speed, so running processors at high speed depletes battery power faster,” he continues. “On the other hand, if a phone can achieve the same app performance with multiple cores running at slower speeds, batteries can last longer. In some cases, depending on the design and if unused cores are turned off when they aren’t being used, they can last a LOT longer, by factors of two to five times.” Howe predicts Apple will introduce a multi-core iPhone sometime next year, in doing so becoming the first company to drive highly parallel OS services and consumer apps into such a device: “And if that helps drive development of iPhones that can run our mobile apps twice or three times as long, this week’s launch of Snow Leopard may have had more strategic import than ‘just a refinement.’”

For more on Howe’s Snow Leopard speculation:
- read this Yankee Group Blog entry

Related articles:
More developers turning the page to Objective-C
Apple
issues iPhone OS 3.1



AT&T rejects Motorola’s Android smartphones

by Jason Ankeny on Monday 31 August 2009

AT&T has reportedly rejected a pair of Motorola smartphones powered by Google’s Android mobile OS. According to MKM Partners analyst Tero Kuittinen, Motorola developed two prototype devices originally created to support Windows Mobile before making the switch to Android–sources close to AT&T say the operator felt the phones were too far out-of-date and turned them down. AT&T declined to comment on the matter according to an article published on TheStreet.com.

Motorola co-CEO Sanjay Jha said on a recent earnings call that the company will release two Android smartphones prior to the holiday season, with two operators already signed on as partners. With AT&T presumably out of the equation, conventional wisdom suggests those operator partners are T-Mobile USA and Verizon Wireless–however, Verizon told TheStreet.com it will not participate in Motorola’s Sept. 10 media event, where the device maker is expected to formally introduce its Android phones. 

For more on Motorola’s Android plans:
- read this TheStreet.com article

Related articles:
Motorola’s Android smartphone details leak
Motorola bets future on Android, Windows Mobile



Intel Graphics Performance Analyzers Webcast- Available until Sept. 2, 2009

by Gladys Viray (Intel) on Monday 31 August 2009

Did you miss hearing Steve Winburn, Manager of the Visual Computing Software Division? Share insights about these powerful new tools designed to help your 3-D games look real, act real and feel real? Listen to his webcast presentation and others, now available for play-back through September 2, 2009.

Click here to read more

Enroll in Intel Software Partner Program today and learn how the program can help you deliver innovative solutions to meet your users’ demands. Learn More


Copyright © 2010 IT Knowledge Hub | Advertise | Contact | Privacy Policy | Terms of Use | Register