|By Joe Winchester||
|March 9, 2005 12:00 AM EST||
Go fast, it runs too slow, you've got to make the number show. Diddle de bop, da la de doop, sitting around and feeling groovy.
Speed Is as Speed Does
Many moons ago I was working on a project that had to be sped up and we had the benefit of a very experienced consultant to help us out. Fresh from his business-class flight and clutching his pay-as-you-go expense account lunch, our management team eagerly led him over to where our assembled developers waited in awe (and with a certain amount of natural coder-sapiens resistance to the hired gun who'd come to town to sheriff us).
Like a surgeon approaching a sick patient we expected a briefcase to be opened revealing dozens of tools for analyzing memory leakage, profiling garbage collection across multiple threads, searching out deadlocks and everything else we assumed was slowing down the program. Instead all he produced was a simple red stopwatch.
All that matters to the user is how long a given scenario takes and whether it's perceived as slow or not. The first thing to do was to identify which tasks were too slow, figure out what response time would be acceptable, and then keep working back against that benchmark.
Apples and Apples
The idea is to focus on real user scenarios and their actual end-to-end response times. Instead of our zippy high-end boxes, dust off older, slower machines and dedicate them to doing the benchmarks. Us spoiled developers often run the latest wizzo kit and don't appreciate the realities of the boxes our code actually runs (or walks on) in the field.
Look Under the Hood
Having identified the slow scenarios, the next step is to identify where the time is going. Probably no single tool can yield all that information, and techniques can vary from simple tracelogs of the current clock time at various stages in the program through to powerful local and total time method breakdowns. Garbage collection, file I/O, page faults, all need to be observed and understood.
Fix What's Broke, Forget What's Not
Looking at the analysis from the running application can yield a bunch of fix candidates. But rather than jumping in and starting to redesign everything, it's good to prove first that there will be a real benefit before doing any work. Like writing a unit test before programming, it may be better to create dummy fixes that simulate the corrected code without being functionally complete. The exercise might involve changing a method to hard coding a result instead of an expensive piece of computation, or putting data in a stale cache and running performance tests to see if the fancy auto-rebuilding dancing cache is really worth doing. Before creating a solution, you have to know there's a real problem as opposed to a perceived one you just feel like polishing. Patch fixes can be created for dummy fixes, applied and run against a full build on the benchmark box to see what affect they have and, by extrapolation, the benefit fully functional fixes will bring to the bottom line.
Optimize Code Paths
Sometimes single method calls result in an explosion of code where a leaf method is being executed thousands of times. With the execution time of the lowest-level method being gauged in fractions of milliseconds, this becomes significant. The solution is to rewrite the code path to avoid such a deluge. The change itself might not be particularly difficult but without a good tool to get the problem on the radar, perhaps as a result of an n squared or even n to the n algorithm, it might never even be considered a possible problem.
One way to produce big performance improvements is to reduce the amount of file reads and writes and socket access. Some data needs to be re-read frequently because it's volatile, but objects such as icons or definition files are good candidates to access once and cache in library registries. Socket I/O is another place to look as well. We found that the problem with one application was in the latency of the conversation, not in the amount of data being sent across the wire. It was overcome by batching data packets together into larger-grained messages.
Cache Model Data
Using a cache to speed something up can be either a silver bullet or fool's gold. The latter is like someone who claims they get great mileage from their car by not driving it. If the program is fast enough to begin with, caches aren't needed, so the first port of call should be to see if there are other unexplored avenues to make things quicker. If a cache is required then it comes with the health warning that you not only have to build it, you need to know when the data you're caching might become stale.
Leave Your Assumptions at the Door
One of the most startling things about tuning a program is that sometimes a lot of fancy code that was initially designed to help performance isn't that useful. Ironically the clever algorithms might actually cause harm. While they may add nothing significant to the bottom line, they can make the code harder to read and understand and affect its maintainability. This is part of the philosophy behind the XP mantra "Make it work, make it right, make it fast." Until you know what's slow, don't try to make it faster.
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
Feb. 7, 2016 03:30 PM EST Reads: 370
The cloud promises new levels of agility and cost-savings for Big Data, data warehousing and analytics. But it’s challenging to understand all the options – from IaaS and PaaS to newer services like HaaS (Hadoop as a Service) and BDaaS (Big Data as a Service). In her session at @BigDataExpo at @ThingsExpo, Hannah Smalltree, a director at Cazena, will provide an educational overview of emerging “as-a-service” options for Big Data in the cloud. This is critical background for IT and data profes...
Feb. 7, 2016 02:45 PM EST Reads: 140
SYS-CON Events announced today that VAI, a leading ERP software provider, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. VAI (Vormittag Associates, Inc.) is a leading independent mid-market ERP software developer renowned for its flexible solutions and ability to automate critical business functions for the distribution, manufacturing, specialty retail and service sectors. An IBM Premier Business Part...
Feb. 7, 2016 02:00 PM EST Reads: 557
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
Feb. 7, 2016 01:45 PM EST Reads: 361
Fortunately, meaningful and tangible business cases for IoT are plentiful in a broad array of industries and vertical markets. These range from simple warranty cost reduction for capital intensive assets, to minimizing downtime for vital business tools, to creating feedback loops improving product design, to improving and enhancing enterprise customer experiences. All of these business cases, which will be briefly explored in this session, hinge on cost effectively extracting relevant data from ...
Feb. 7, 2016 01:30 PM EST
With the Apple Watch making its way onto wrists all over the world, it’s only a matter of time before it becomes a staple in the workplace. In fact, Forrester reported that 68 percent of technology and business decision-makers characterize wearables as a top priority for 2015. Recognizing their business value early on, FinancialForce.com was the first to bring ERP to wearables, helping streamline communication across front and back office functions. In his session at @ThingsExpo, Kevin Roberts...
Feb. 7, 2016 12:00 PM EST Reads: 344
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 ad...
Feb. 7, 2016 11:30 AM EST Reads: 346
With an estimated 50 billion devices connected to the Internet by 2020, several industries will begin to expand their capabilities for retaining end point data at the edge to better utilize the range of data types and sheer volume of M2M data generated by the Internet of Things. In his session at @ThingsExpo, Don DeLoach, CEO and President of Infobright, will discuss the infrastructures businesses will need to implement to handle this explosion of data by providing specific use cases for filte...
Feb. 7, 2016 10:15 AM EST Reads: 108
As enterprises work to take advantage of Big Data technologies, they frequently become distracted by product-level decisions. In most new Big Data builds this approach is completely counter-productive: it presupposes tools that may not be a fit for development teams, forces IT to take on the burden of evaluating and maintaining unfamiliar technology, and represents a major up-front expense. In his session at @BigDataExpo at @ThingsExpo, Andrew Warfield, CTO and Co-Founder of Coho Data, will dis...
Feb. 7, 2016 07:00 AM EST Reads: 121
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry's single source for the cloud. Fusion's advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including clou...
Feb. 6, 2016 03:30 PM EST Reads: 720
Most people haven’t heard the word, “gamification,” even though they probably, and perhaps unwittingly, participate in it every day. Gamification is “the process of adding games or game-like elements to something (as a task) so as to encourage participation.” Further, gamification is about bringing game mechanics – rules, constructs, processes, and methods – into the real world in an effort to engage people. In his session at @ThingsExpo, Robert Endo, owner and engagement manager of Intrepid D...
Feb. 5, 2016 09:00 PM EST Reads: 785
Eighty percent of a data scientist’s time is spent gathering and cleaning up data, and 80% of all data is unstructured and almost never analyzed. Cognitive computing, in combination with Big Data, is changing the equation by creating data reservoirs and using natural language processing to enable analysis of unstructured data sources. This is impacting every aspect of the analytics profession from how data is mined (and by whom) to how it is delivered. This is not some futuristic vision: it's ha...
Feb. 2, 2016 02:00 PM EST Reads: 412
WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was. You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.
Feb. 2, 2016 04:30 AM EST Reads: 851
Learn how IoT, cloud, social networks and last but not least, humans, can be integrated into a seamless integration of cooperative organisms both cybernetic and biological. This has been enabled by recent advances in IoT device capabilities, messaging frameworks, presence and collaboration services, where devices can share information and make independent and human assisted decisions based upon social status from other entities. In his session at @ThingsExpo, Michael Heydt, founder of Seamless...
Feb. 1, 2016 05:00 AM EST Reads: 940
The IoT's basic concept of collecting data from as many sources possible to drive better decision making, create process innovation and realize additional revenue has been in use at large enterprises with deep pockets for decades. So what has changed? In his session at @ThingsExpo, Prasanna Sivaramakrishnan, Solutions Architect at Red Hat, discussed the impact commodity hardware, ubiquitous connectivity, and innovations in open source software are having on the connected universe of people, thi...
Jan. 31, 2016 09:00 PM EST Reads: 726
WebRTC: together these advances have created a perfect storm of technologies that are disrupting and transforming classic communications models and ecosystems. In his session at WebRTC Summit, Cary Bran, VP of Innovation and New Ventures at Plantronics and PLT Labs, provided an overview of this technological shift, including associated business and consumer communications impacts, and opportunities it may enable, complement or entirely transform.
Jan. 31, 2016 07:15 PM EST Reads: 1,146
For manufacturers, the Internet of Things (IoT) represents a jumping-off point for innovation, jobs, and revenue creation. But to adequately seize the opportunity, manufacturers must design devices that are interconnected, can continually sense their environment and process huge amounts of data. As a first step, manufacturers must embrace a new product development ecosystem in order to support these products.
Jan. 31, 2016 10:00 AM EST Reads: 812
There are so many tools and techniques for data analytics that even for a data scientist the choices, possible systems, and even the types of data can be daunting. In his session at @ThingsExpo, Chris Harrold, Global CTO for Big Data Solutions for EMC Corporation, showed how to perform a simple, but meaningful analysis of social sentiment data using freely available tools that take only minutes to download and install. Participants received the download information, scripts, and complete end-t...
Jan. 31, 2016 10:00 AM EST Reads: 1,217
Manufacturing connected IoT versions of traditional products requires more than multiple deep technology skills. It also requires a shift in mindset, to realize that connected, sensor-enabled “things” act more like services than what we usually think of as products. In his session at @ThingsExpo, David Friedman, CEO and co-founder of Ayla Networks, discussed how when sensors start generating detailed real-world data about products and how they’re being used, smart manufacturers can use the dat...
Jan. 30, 2016 07:45 PM EST Reads: 791
When it comes to IoT in the enterprise, namely the commercial building and hospitality markets, a benefit not getting the attention it deserves is energy efficiency, and IoT’s direct impact on a cleaner, greener environment when installed in smart buildings. Until now clean technology was offered piecemeal and led with point solutions that require significant systems integration to orchestrate and deploy. There didn't exist a 'top down' approach that can manage and monitor the way a Smart Buildi...
Jan. 30, 2016 03:45 PM EST Reads: 1,268