Giter Site home page Giter Site logo

opencog / benchmark Goto Github PK

View Code? Open in Web Editor NEW
6.0 11.0 9.0 14.52 MB

Benchmarking the AtomSpace, the pattern matcher and other OpenCog systems

License: GNU Affero General Public License v3.0

CMake 0.01% C++ 0.21% Python 0.04% Scheme 99.73% Perl 0.01% Gnuplot 0.01% Makefile 0.01%
benchmark atomspace pattern-matcher

benchmark's Introduction

Benchmark

Collection of tools and data to benchmark the AtomSpace, the pattern matcher and other OpenCog processes.

Organization

Each distinct benchmark has it's own instructions for building and running it. See individual directories for details.

The most interesting benchmarks are probably the query-links and query-loop benchmarks (because they are "real-world" benchmarks) and the atomspace benchmark (because it has a very long measurement history, despite being deeply flawed).

  • assembly -- examination of assembly code of some simple programs.

  • atomspace -- A synthetic benchmark for measuring core AtomSpace functions, such as rates for creating Nodes and Links, rates for deleting them, and rates for setting and getting TruthValues and IncomingSets.

  • micro -- Micro-benchmarks for misc items. These benchmarks do not work correctly! They're just plain broken! They report incorrect results! DO NOT USE! See the README in the subdirectory for details about what's wrong.

  • python -- Benchmarks for the python bindings to various AtomSpace subsystems.

  • query-trite -- A synthetic benchmark containing some trivial pattern matcher queries.

  • query-links -- Several real-world benchmarks for performing complex pattern matchs on a real-world natural-language dataset. One models an activity one might need in a parser, that of joining together connectors. It creates 576 BindLink's with four GlobNodes and a Variable, each. The Globs are used to search for connectable connectors, similar to what parser would need to do. That is, this is a search over "jigsaw puzzle pieces", looking for pairs of jigsaw pieces that can connect.

    A second benchmark in this directory computes dot products of vectors in six different ways, each using an increasingly complex query pattern. Uses the same base dataset.

  • query-loop -- A real-world benchmark for performing a complex pattern match on a real-world genome dataset. Uses EvaluationLink in a simple/straight-forward way to represent the edges and vertexes of a large graph (for gene/protein interactions), and then hunts for triangles and pentagons in that graph.

  • cogserver -- Benchmark of network I/O to the cogserver. Highlights issues created by using netcat instead of using native socket I/O.

Using perf

It can be useful to use perf. Sometimes. Maybe. Here's the cheat-sheet:

To record 15 seconds worth:

sudo perf record -F 199 -p pid --call-graph fp -- sleep 15

CAUTION: need to run perf as root, and it writes crap into the /root/.debug folder! This eats disk!

View reports:

perf report
perf report -n
perf report --stdio -n -g -G

benchmark's People

Contributors

amebel avatar edguy3 avatar ferrouswheel avatar inflector avatar kasimebrahim avatar linas avatar misgeatgit avatar ngeiswei avatar vsbogd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

benchmark's Issues

benchmark 'typical' EvaluationLinks

The current atomspace benchmark only measures node and link creation, and not 'typical' data. resulting in real-life performance that is one or two orders of magnitude worse than what's measured. See for example: opencog/test-datasets#7

The benchmark needs to be updated to measure more 'typical' data.

Use standard C++ benchmarking library for atomspace microbenchmarks

To follow up the @linas comment: here and to not reinvent the wheel I would propose using some ready C++ benchmarking library.

Requirements to such library:

  • ability to keep run results
  • ability to compare run results
  • showing info on system which is used to perform test
  • anti-optimization tricks

Google Benchmark (https://github.com/google/benchmark) seems to be a good candidate. Unfortunately there are no ready to install packages for benchmark libraries so it will be additional manual step in building procedure.

Other well known libraries:

Some review and comparision can be found here (full articles are here and here).

Measure ScopeLink, GetLink, BindLink, DualLink performance

Scope links are probably the most expensive link types to construct and insert in the AtomSpace. First calculating the hash value during construction is more expensive than for non scope links. Scope links like PatternLink, BindLink, etc, are even more expensive to construct so. Then inserting them to the AtomSpace also requires more computation like testing for alpha-equivalence.

query_benchmark does support scope links but mostly for querying, not construction and insertion...

All that to say that scope links really should be supported by atomspace_bm (if that doesn't get replaced by something else soon).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.