Changes between Version 21 and Version 22 of DebuggingBenchmarking


Ignore:
Timestamp:
Mar 8, 2017 12:01:02 PM (5 months ago)
Author:
bbell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DebuggingBenchmarking

    v21 v22  
    88
    99== Debuging rasserver ==
    10 It's a good idea to configure rasdaman with the following options: `--with-debug-symbols --with-optimization=0`
    1110
    12 Furthermore in rasnet (the default network protocol), in order to attach to the rasserver process (with e.g. `gdb -p <rasserver pid>`) it is necessary to increase the values of `SERVER_MANAGER_CLEANUP_INTERVAL`
     11It is a good idea to configure Rasdaman using cmake (v3+) with the following option:-DCMAKE_CXX_FLAGS=" -O0 -g3 -gdwarf-2 -rdynamic". (For autotools, you would use the following options: `--with-debug-symbols --with-optimization=0`)
     12
     13Furthermore, in rasnet (the default network protocol), in order to attach to the rasserver process (with e.g. `gdb -p <rasserver pid>`) it is necessary to increase the values of `SERVER_MANAGER_CLEANUP_INTERVAL`
    1314and `CLIENT_MANAGER_CLEANUP_INTERVAL` in source:rasmgr_x/src/constants.hh to large values.
    1415
    15 When not debugging the network protocol, it's recommended to use directql which is a single executable rasserver that doesn't use any client/server protocol, instead of rasql.
     16When not debugging the network protocol, it's recommended to use directql, which is a single executable rasserver utilizing no client/server protocol, instead of rasql.
    1617
    1718
     
    2122
    2223Rasdaman should be configured and installed without optimization '''(level: 0)''' (http://stackoverflow.com/a/1778700/2028440), otherwise gdb and other tools will be barely useful.
     24
     25
     26* If you use cmake to compile (http://rasdaman.org/wiki/InstallFromSource/cmake):
     27{{{
     28// You can add the flags for g++ by adding these values in DCMAKE_CXX_FLAGS
     29(e.g: -DCMAKE_CXX_FLAGS=" -O0 -g3 -gdwarf-2 -rdynamic" will append the optimization flag " -O0 -g3 -gdwarf-2 -rdynamic" in g++,
     30where -O0 is equivalent to --with-optimization=0).
     31}}}
    2332
    2433* If you use autotools to compile (deprecated):
     
    3039}}}
    3140
    32 * If you use cmake to compile (http://rasdaman.org/wiki/InstallFromSource/cmake):
    33 {{{
    34 // You can add the flags for g++ by adding these values in DCMAKE_CXX_FLAGS
    35 (e.g: -DCMAKE_CXX_FLAGS=" -O0 -g3 -gdwarf-2 -rdynamic" will append the optimization flag " -O0 -g3 -gdwarf-2 -rdynamic" in g++,
    36 where -O0 is equivalent to --with-optimization=0).
    37 }}}
    38 
    39 When executing directql use the same parameters as for rasql, but add `-d /opt/rasdaman/data/RASBASE` (or substitute that to whatever is the -connect value in rasmgr.conf).
     41When executing directql, use the same parameters as for rasql, but add `-d /opt/rasdaman/data/RASBASE` (or substitute that to whatever is the -connect value in rasmgr.conf).
    4042
    4143Example with gdb:
     
    4951}}}
    5052
    51 Valgrind can similarly be used to detect memory errors or leaks, e.g.
     53Valgrind can similarly be used to detect uninitialized values, memory errors, and memory leaks, e.g.
    5254{{{
    5355valgrind --leak-check=full --track-origins=yes directql -q 'query that causes memory problems' --out file -d /opt/rasdaman/data/RASBASE
     
    5658== Enabling extra output at compile time ==
    5759
    58 In order to effect any extra output (besides standard logging) at all the code must be compiled with the resp. option enabled.
    59 Reason is that writing an abundance of lines into log files slows down performance somewhat and further has a tendency to flood file systems - two reasons to enable it only if needed, not in production operation.
     60In order to effect any extra output (besides standard logging) at all, the code must be compiled with the resp. option enabled.
     61This is not default in production operation for at least two reasons: writing an abundance of lines into log files slows down performance somewhat, and, additionally, logging has a tendency to flood file systems; however, the option is available when needed.
    6062
    6163If you are compiling with cmake (v3+), simply use -DENABLE_DEBUG before generating the build tree.