From 38fc7a0eb46167a27ebac41452ecd1fb0de8803c Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 21 Feb 2011 10:02:16 +0100 Subject: Fix slow parsing of crashdumps This is a first attempt at fixing the problem described in seq11783 - crashdump_viewer is very slow at parsing big crashdumps. To open the first page for a dump of 17M takes about 2 minutes and a dump of 280M takes 1.5-2 hours. The main problmem is that the cdv_dump_index_table, which holds all tags read from the dump, is a bag. Profiling shows that ~95% of the time is spent in ets:insert. The table is now changed to an ordered_set. A second problem occured when a page with many table rows was opened. These pages were sent to inet in one chunk, causing both crashdump_viewer_server and the inets (mod_esi) process to grow very much in memory usage. To overcome this, the pages are now sent to inets in chunks of 1000 rows, and the data is coverted to binaries to avoid data copying between the two processes. Also, some new information in the crashdump was not recognized by the crashdump_viewer. This has been fixed. --- lib/observer/test/crashdump_viewer_SUITE.erl | 33 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'lib/observer/test') diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index 1a7e6f61fe..c547b997d1 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2010. All Rights Reserved. +%% Copyright Ericsson AB 2003-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -414,16 +414,17 @@ special(Port,File) -> _ -> ok end; - ".250atoms" -> - Html1 = contents(Port,"atoms"), - NextLink1 = next_link(Html1), - "Atoms" = title(Html1), - Html2 = contents(Port,NextLink1), - NextLink2 = next_link(Html2), - "Atoms" = title(Html2), - Html3 = contents(Port,NextLink2), - "" = next_link(Html3), - "Atoms" = title(Html3); + %%! No longer needed - all atoms are shown on one page!! + %% ".250atoms" -> + %% Html1 = contents(Port,"atoms"), + %% NextLink1 = next_link(Html1), + %% "Atoms" = title(Html1), + %% Html2 = contents(Port,NextLink1), + %% NextLink2 = next_link(Html2), + %% "Atoms" = title(Html2), + %% Html3 = contents(Port,NextLink2), + %% "" = next_link(Html3), + %% "Atoms" = title(Html3); _ -> ok end, @@ -509,14 +510,14 @@ next_link(Html) -> toggle_menu(Port) -> - Html = contents(Port,"toggle?index=10"), + Html = contents(Port,"toggle?index=4"), check_toggle(Html). check_toggle(Html) -> case Html of - " + " collapsed; - " + " exploded; [_H|T] -> check_toggle(T) @@ -543,10 +544,10 @@ expand_link(Html) -> port_details(Port) -> - Port1 = contents(Port,"ports?port=Port<0.1>"), + Port1 = contents(Port,"port?port=Port<0.1>"), "#Port<0.1>" = title(Port1), - Port0 = contents(Port,"ports?port=Port<0.0>"), + Port0 = contents(Port,"port?port=Port<0.0>"), "Could not find port: #Port<0.0>" = title(Port0). is_truncated(File) -> -- cgit v1.2.3