Code Monkey home page Code Monkey logo

Comments (1)

sunetos avatar sunetos commented on June 9, 2024

I'm cross-posting this from the message group in case it's more useful here.

I don't believe the problem is isolated to DELETE or SPARQL. I am evaluating 4store as a graph database, and I made a python script that generates 15,600 triples and POSTs them to 4store in Turtle format. I first create a graph with 6 triples, then I append to it (POST) in various ways as a test:

  1. Join the turtle triples with newlines, and send one request with a graph.
  2. Send each individual triple with a new HTTP connection and request.
  3. Reuse HTTP connections, but still do a separate POST for each triple.

Results:

Took 0.71 seconds to batch import 15600 triples
Took 400.48 seconds to concurrent import 15600 triples
Took 271.22 seconds to concurrent import 15600 triples, reusing connections

In cases 2 & 3, 4s-httpd is using 95% CPU the entire time. Since I want to use 4store as a graph database for an application, my usage model will be closest to the 3rd scenario (lots of one-shot requests with a single triple). The performance overhead with the separate requests is astounding; hopefully there's a low-hanging-fruit bug to fix it.

EDIT:
I should mention I'm on a 2010 Macbook Air running the default configuration of 4store, and I used 10 concurrent threads (actually greenlets) to do the POSTing in cases 2 and 3.

from 4store.

Related Issues (20)

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.