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

Allow to control number of workers during import #237

Closed
yohanboniface opened this issue Feb 10, 2017 · 9 comments
Closed

Allow to control number of workers during import #237

yohanboniface opened this issue Feb 10, 2017 · 9 comments
Milestone

Comments

@yohanboniface
Copy link
Member

sqlite crashes when using 24 cores, so it may be helpful to limit them a bit.

@davidbgk
Copy link
Contributor

Or change the multithreading options?

@yohanboniface
Copy link
Member Author

Serialized. In serialized mode, SQLite can be safely used by multiple threads with no restriction.

Which seems to be the default mode.

Also, for the record, not sure here it's relevant (I guess they write "thread" like "things"), but we are doing multiprocessing, not multithreading.

@cquest
Copy link
Member

cquest commented Feb 13, 2017

I tried to add locks (acquire/release) with no effect :(

@davidbgk
Copy link
Contributor

@cquest do you know exactly how many cores leads to errors? For the moment we only know that 8 works and 24 doesn't. Might be useful to get the exact limit point to investigate.

@cquest
Copy link
Member

cquest commented Feb 13, 2017

The limit is not that clear. I got crashes with 4 processes.
The more cores you have the more often you'll have some trouble, same applies with slower disks as it takes more time for sqlite to update its db/journal. In my case, I have 24 cores and the sqlite db/journal is stored on HDD (not SSD).
Limiting the number of process is not safe (unless we only have 1).

@davidbgk
Copy link
Contributor

davidbgk commented Feb 13, 2017

Do you have an error message from sqlite? A log or something? Hard to reproduce when you're somehow limited in terms of CPUs…

@davidbgk
Copy link
Contributor

davidbgk commented Feb 13, 2017

Enabling tracebacks might help debugging. Did you play with the isolation level?

@davidbgk
Copy link
Contributor

davidbgk commented Feb 13, 2017

More options from that Reddit thread using PRAGMA and verify that AUTOINCREMENT is disabled.

@davidbgk
Copy link
Contributor

Many readers but only one writer? C'mon SQLite… We can try to adapt the busy_timeout option but I'm pessimistic about the resolution of that issue.

@davidbgk davidbgk added this to the 1.0.0 milestone Feb 14, 2017
@davidbgk davidbgk modified the milestones: 1.0.0, 1.0.0-rc.1 Feb 14, 2017
yohanboniface added a commit that referenced this issue Feb 22, 2017
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

3 participants