Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centrifugation: calculate simhash(body) and simhash(text(body)) #124

Merged
merged 3 commits into from
Oct 26, 2018

Conversation

darkk
Copy link
Contributor

@darkk darkk commented Oct 26, 2018

It'll enable heuristics that rely on page similarity to mine more blockpages our of existing OONI dataset.

Draft implementation included non-trivial caching scheme that was trying to avoid unnecessary computation of simhashes for known body_sha256 values. It turned out that the complexity of the code was providing not that much benefits for the modern state of OONI data. There are still ~30% of perfectly same pages coming from different probes, but runtime de-duplication takes as much real time as computing hashes, moreover, existing code took non-trivial amount of RAM (over 512M) for computation.

Here are approximate relative numbers of wall clock time needed to ingest a bucket of OONI data:

No simhash — 1.0
Old simhash — 4.8
New simhash(body) — 4.7
Same + simhash(text) — 6.0

Current bucket ingestion takes 40...80 minutes, so it'll become 4..8 hours. That's still okay as it's single-CPU and can easily utilize SMP when it'll be needed.

An open problem is re-ingestion of data stored in http_control and http_request tables as it'll include re-computation of all the simhashes without any good reason.

So the de-duplication code is dropped and simhashes are stored together with body_sha256.

Also, re-run mubench/hash64_shingles to check for possible regressions.
It'll enable heuristics that rely on page similarity to mine more
blockpages our of existing OONI dataset.

Draft implementation included non-trivial caching scheme that was trying
to avoid unnecessary computation of simhashes for known body_sha256
values. It turned out that the complexity of the code was providing not
that much benefits for the modern state of OONI data.  There are still
~30% of perfectly same pages coming from different probes, but runtime
de-duplication takes as much real time as computing hashes, moreover,
existing code took non-trivial amount of RAM (over 512M) for computation.

Here are approximate relative numbers of wall clock time needed to
ingest a bucket of OONI data:

No simhash           -- 1.0
Old simhash          -- 4.8
New simhash(body)    -- 4.7
Same + simhash(text) -- 6.0

Current bucket ingestion takes 40...80 minutes, so it'll become 4..8
hours. That's still okay as it's single-CPU and can easily utilize SMP
when it'll be needed.

An open problem is re-ingestion of data stored in http_control and
http_request tables as it'll include re-computation of all the simhashes
without any good reason.

So the de-duplication code is dropped and simhashes are stored together
with body_sha256.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant