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

Remove synchronization from TargetStorage that prevents better parallelization #56

Closed
aecio opened this issue Aug 25, 2016 · 1 comment

Comments

@aecio
Copy link
Member

aecio commented Aug 25, 2016

Remove synchronization from TargetStorage that prevents some CPU-bound tasks such as language detection and page classification to run concurrently.

@aecio
Copy link
Member Author

aecio commented Sep 29, 2016

A very simple benchmark on my machine (CPU with 32 cores) shows following improvements:

(Crawl execution was timed using Linux's time tool.)

BEFORE (commit f47f2dd):

real    15m0.426s
user    34m1.744s
sys 1m7.540s

Crawl time: ~15 minutes
User/real time: 2.26
Observed CPU usage: around 200%-300%
Crawled pages: 4.314
pages/min: 287.6

AFTER (commit 6025a26):

real    20m35.727s
user    232m24.804s
sys 3m3.800s

Crawl time: ~20 minutes
User/real time: 11.6
Observed CPU usage: around 1200%-1900%
Crawled pages: 65.240
pages/min: 3106.67

Considering the pages/min metric, it is a 980% improvement. There's still room for improvement, since there are still some big portions of code that are still synchronized for thread safety.

@aecio aecio closed this as completed Sep 29, 2016
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

No branches or pull requests

1 participant