Coder Social home page Coder Social logo

Comments (2)

msm-code avatar msm-code commented on May 29, 2024

Benchmark: compacting a big dataset collection, and querying DB at the same time. All tests done after dropping VM cache. All tests repeated 3 times.

  1. Performance when not compacting (baseline, best case performnance):
  • 0:39
  • 0:40
  • 0:40
  1. Performance when compacting (master):
  • 1:03
  • 1:07
  • 1:11
  1. Performance when compacting (after #213)
  • 1:17
  • 1:13
  • 1:09

Yeah, on average the database got slower. But I realised that's because IO priority is per process, not per thread. And ursadb is a single (multi-threaded) process. So I can't actually do what I hoped to do.

But that's not all - I've tried to work around this by running a second ursadb process ("slow" process for compacting), and the results are

  1. Performance when compacting (after #213, with separate process):
  • 1:11
  • 1:24
  • 1:16

And this is... Even slower? This is surprising to me, I think this time all the priorities were installed as I wanted them to be.

But just to be sure I've ran a second DB by just manually changing the priority with ionice, and:

  1. Performance when compacting (after #213, with separate process, one started by ionice -c 3):
  • 1:10
  • 1:10
  • 1:15

I have to say this is underwhelming.

Also actually I also suspect that a big part of the slowdown comes from the fact that OS' disk cache is filled by useless (never again used) data. Maybe I should experiment with MADV_DONTNEED instead?

Anyway, looks like this approach may be more challenging than I suspected. Looks like I need to ponder on this topic a bit more 🤔

from ursadb.

msm-code avatar msm-code commented on May 29, 2024

Initial tests suggest that adding fadvise may not help either:

  • 1:03
  • 1:16
  • 1:15

from ursadb.

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.