Share this
Visualising Lots of Data
by Richard Leeke on 10 October 2011
In a previous blog entry (Calculating Percentiles with Tableau.) I discussed ways to visualise the distribution of transaction response times and showed how a percentile chart and a scatter plot can provide a very effective and complementary pair of views of the same data. In particular, I described how to make that viable with large datasets.
I’ve recently been analysing some really, really large data sets with an extremely wide range of data values and experimenting with alternative ways to visualise that. One particular representation which I describe below has proved very effective.
The data sets in question hold details of events recorded for all threads of all processes on a busy database server around the time of unexplained blockages. I am trying to find clues about the cause of the blockages. Each sample has around 100 million events, spanning anywhere from 20 seconds to 2 minutes, depending on system activity levels at the time. The peak event rate was around 10 million events per second.
With that much data, it’s useful to start by getting a high level understanding of the data distribution in as many dimensions as possible, before getting too buried in the detail. One measure which has proved interesting is the delay between events for each thread. The actual values of the delays don’t initially give much insight in themselves, but changes in the pattern of delays can provide clues about changes in system behaviour, and hence where to look next.
The delays ranged from around 100 nanoseconds to 100 seconds, with the vast majority down at the microsecond level. The challenge was therefore to find a way to represent the distribution of such a large set of values spanning such a wide range, in a way that would highlight changes in patterns of behaviour.
How about a percentile plot?
The technique I discussed in the previous blog posting proved to be quite capable of calculating the percentiles over a data set of this size – in fact this data was one of the triggers which prompted me to figure out that technique.
The first thing that became clear when trying that on this data distribution was that the very wide range of the scale of the values (100 nano-seconds to 100 seconds) required a logarithmic scale for the display, otherwise all of the detail is obscured by the scale required to see the outliers.
With the benefit of the log scale, the period of the blockage (from about 50 seconds to 118 seconds into the sample) becomes very obvious.
But even with a log scale, displaying one percentile at a time (such as the line chart shown here of the 99th percentile) really doesn’t convey the whole story at a glance. Sure, you can explore the distribution by looking at different percentiles – but I want a single visualisation which gives an “aerial view” of everything.
Or a scatter chart?
The next thing I tried was a scatter chart, bucketing both the offset time and the delay values, to make the number of marks manageable, using the approach I described in the previous blog posting.
Once again, I had to use a log scale to handle the range of values (i.e. bucketing the log of the delay values), but even then, I was left with a dense mass of marks and it was initially impossible to tell much about the data distribution.
One approach which can help with that is to use a heat-map – with the colour of each mark representing the number of events in that bucket.
Once again, the scale of numbers involved meant that initially that wasn’t very effective. The number of events per bucket ranged from 1 to over 100,000, with the vast majority of marks down at the low end of that range. So it was hard to arrange the colour scale to convey any useful information. So I ended up using a second log scale – this time colouring the marks by the log of the number of events (below).
That was more effective and definitely started to convey something of the distribution – with the blockage times (from about 52 to 118 seconds) again clearly visible, since there were far fewer events during the blockage, resulting in much fewer red marks at those times.
Especially when viewed at higher resolution, a wealth of detail can be seen during the period of the blockages, as can be seen at the left.
I have no idea what the “gothic arches” mean, but as this is the time when the blockage was happening, they may well be significant.
[Edit: I had a quick poke around to see what causes the arches. The reason for the shape is simple. These are really just straight lines, distorted by the log scale. It turns out that they are generated by the processor's idle loop. I still don't understand why the delays between those events are following that pattern, but I'm inclined to think that this is a consequence of the blockage, not the cause.]
Whilst this view is quite effective, it is still very difficult to quantify anything from looking at it.
What was the rate of events?
What was the distribution of response times?
What about a log-scale percentile rank heat-map?
A what?
I decided to try a cross between the two approaches and use a heat map representation of percentiles.
The problem with the first attempt with percentiles was that it only shows one percentile at once. So why not display all the percentiles – by calculating the percentile rank of all points and using a continuous colour scale to show the distribution.
That approach is shown below. The colour scale shows the percentile rank, ranging from 0 (minimum) in blue to 100 (maximum) in red. The 50th percentile (median) is in the yellow to orange range.
The coloured marks show the distribution of response times in every time bucket very effectively, but on their own, they don’t give any indication of the rate of events. The dark line overlaying the chart is therefore needed to show the event rate.
Note that the “gothic arches” from the scatter chart can still just be seen, even with the much reduced level of detail.
This visualisation gives the sort of "aerial view" I was after. Drilling down on this overview by various dimensions can then be done by producing a series of mini-charts. For example the view can be broken down by process or type of event.
Applying the technique to simpler data sets
Having come up with this approach, I’ve found that it actually proves to be a really effective way to visualise less demanding data sets.
One of the most common types of data that we need to present in Performance Engineering is system response time, often presented over the course of a test run or a period of monitoring of a production system. The information we want to convey is typically the distribution of response times as a function of workload.
The chart below shows all percentile ranks for transaction response times, in one minute buckets, over the course of a 2 hour “ramp-up” test. The workload, in transactions per second, is shown by the overlaid line. There are about 2 million rows in the underlying data.
I think that chart provides a really effective summary of the performance characteristics for the test.
Notice how the response times improve over the course of the test, with clear steps down in response time visible as the workload steps up, particularly at the start of the test. Those response time steps would be barely detectable in a scatter plot, but the discontinuity in the colour gradient highlights them really clearly.
Hang on. Isn’t that the wrong way round? Don’t systems get slower as the load increases?
This is actually a beautiful illustration of the effectiveness of Nagle's_algorithm, a clever optimisation which helps avoid network congestion (and one of the reasons the Internet works). Nagle’s algorithm is the TCP/IP equivalent of getting an airport shuttle-bus rather than a taxi. At off-peak times, the driver will wait a few minutes for more passengers rather than head off nearly empty. At peak times the shuttle fills up quickly, so you head off sooner. A few shuttle buses rather than a fleet of taxis means the roads are less congested. Nagle’s algorithm says wait up to 100 ms before sending that half-empty packet, thereby reducing network congestion.
The transaction response times measured here involve several network round-trips. So at low transaction rates there will be several delays of up to 100 ms. At high transaction rates the packets fill quickly and the delays virtually disappear.
The insight this visualisation gives means it's going to be a very regularly used tool in my kitbag from now on.
Share this
- Agile Development (153)
- Software Development (126)
- Agile (76)
- Scrum (66)
- Application Lifecycle Management (50)
- Capability Development (47)
- Business Analysis (46)
- DevOps (43)
- IT Professional (42)
- Equinox IT News (41)
- Agile Transformation (38)
- IT Consulting (38)
- Knowledge Sharing (36)
- Lean Software Development (35)
- Requirements (35)
- Strategic Planning (35)
- Solution Architecture (34)
- Digital Disruption (32)
- IT Project (31)
- International Leaders (31)
- Digital Transformation (26)
- Project Management (26)
- Cloud (25)
- Azure DevOps (23)
- Coaching (23)
- IT Governance (23)
- System Performance (23)
- Change Management (20)
- Innovation (20)
- MIT Sloan CISR (15)
- Client Briefing Events (13)
- Architecture (12)
- Working from Home (12)
- IT Services (10)
- Data Visualisation (9)
- Kanban (9)
- People (9)
- Business Architecture (8)
- Communities of Practice (8)
- Continuous Integration (7)
- Business Case (4)
- Enterprise Analysis (4)
- Angular UIs (3)
- Business Rules (3)
- GitHub (3)
- Java Development (3)
- Lean Startup (3)
- Satir Change Model (3)
- API (2)
- Automation (2)
- Scaling (2)
- Security (2)
- Toggles (2)
- .Net Core (1)
- AI (1)
- Diversity (1)
- Testing (1)
- ✨ (1)
- August 2024 (1)
- February 2024 (3)
- January 2024 (1)
- September 2023 (2)
- July 2023 (3)
- August 2022 (4)
- August 2021 (1)
- July 2021 (1)
- June 2021 (1)
- May 2021 (1)
- March 2021 (1)
- February 2021 (2)
- November 2020 (2)
- September 2020 (1)
- July 2020 (1)
- June 2020 (3)
- May 2020 (3)
- April 2020 (2)
- March 2020 (8)
- February 2020 (1)
- November 2019 (1)
- August 2019 (1)
- July 2019 (2)
- June 2019 (2)
- April 2019 (3)
- March 2019 (2)
- February 2019 (1)
- December 2018 (3)
- November 2018 (3)
- October 2018 (3)
- September 2018 (1)
- August 2018 (4)
- July 2018 (5)
- June 2018 (1)
- May 2018 (1)
- April 2018 (5)
- March 2018 (3)
- February 2018 (2)
- January 2018 (2)
- December 2017 (2)
- November 2017 (3)
- October 2017 (4)
- September 2017 (5)
- August 2017 (3)
- July 2017 (3)
- June 2017 (1)
- May 2017 (1)
- March 2017 (1)
- February 2017 (3)
- January 2017 (1)
- November 2016 (1)
- October 2016 (6)
- September 2016 (1)
- August 2016 (5)
- July 2016 (3)
- June 2016 (4)
- May 2016 (7)
- April 2016 (13)
- March 2016 (8)
- February 2016 (8)
- January 2016 (7)
- December 2015 (9)
- November 2015 (12)
- October 2015 (4)
- September 2015 (2)
- August 2015 (3)
- July 2015 (8)
- June 2015 (7)
- April 2015 (2)
- March 2015 (3)
- February 2015 (2)
- December 2014 (4)
- September 2014 (2)
- July 2014 (1)
- June 2014 (2)
- May 2014 (9)
- April 2014 (1)
- March 2014 (2)
- February 2014 (2)
- December 2013 (1)
- November 2013 (2)
- October 2013 (3)
- September 2013 (2)
- August 2013 (6)
- July 2013 (2)
- June 2013 (1)
- May 2013 (4)
- April 2013 (5)
- March 2013 (2)
- February 2013 (2)
- January 2013 (2)
- December 2012 (1)
- November 2012 (1)
- October 2012 (2)
- September 2012 (3)
- August 2012 (3)
- July 2012 (3)
- June 2012 (1)
- May 2012 (1)
- April 2012 (1)
- February 2012 (1)
- December 2011 (4)
- November 2011 (2)
- October 2011 (2)
- September 2011 (4)
- August 2011 (2)
- July 2011 (3)
- June 2011 (4)
- May 2011 (2)
- April 2011 (2)
- March 2011 (3)
- February 2011 (1)
- January 2011 (4)
- December 2010 (2)
- November 2010 (3)
- October 2010 (1)
- September 2010 (1)
- May 2010 (1)
- February 2010 (1)
- July 2009 (1)
- April 2009 (1)
- October 2008 (1)