danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Don't check the hard limit on each insert #339

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

When inserting keys, don't check if they will hit the hardlimit on each single insert as the keys eviction fiber has already a mechanism to enter an --extreme-- purging mode if the the hard limit is going to be hit very soon.

This check literally reduces the performances by 50% when doing pipelines inserts, has an impact as well when doing normal sets.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.01 :tada:

Comparison is base (b54e11d) 77.05% compared to head (14680dc) 77.06%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #339 +/- ## ========================================== + Coverage 77.05% 77.06% +0.01% ========================================== Files 179 179 Lines 12428 12414 -14 ========================================== - Hits 9576 9566 -10 + Misses 2852 2848 -4 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `77.06% <ø> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/danielealbano/cachegrand/pull/339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [src/storage/db/storage\_db.c](https://codecov.io/gh/danielealbano/cachegrand/pull/339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3N0b3JhZ2UvZGIvc3RvcmFnZV9kYi5j) | `62.73% <ø> (+0.22%)` | :arrow_up: | | [src/storage/db/storage\_db.h](https://codecov.io/gh/danielealbano/cachegrand/pull/339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3N0b3JhZ2UvZGIvc3RvcmFnZV9kYi5o) | `30.77% <ø> (-10.41%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://codecov.io/gh/danielealbano/cachegrand/pull/339/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.