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

Investigate multicore performance drop #316

Open
krlmlr opened this issue Mar 27, 2020 · 3 comments
Open

Investigate multicore performance drop #316

krlmlr opened this issue Mar 27, 2020 · 3 comments

Comments

@krlmlr
Copy link
Member

krlmlr commented Mar 27, 2020

https://serverfault.com/q/1000690/95758

https://www.sqlite.org/wal.html

https://www.sqlite.org/pragma.html#pragma_synchronous

@DavorJ
Copy link

DavorJ commented Apr 25, 2020

@krlmlr, this was on my todo list for a long time, but due to priorities....

Anyway, I executed your script (https://serverfault.com/q/1000690/95758) on windows with 2 small modifications: Sys.getpid() and 4 cores (since I only have 4 physical). Here are the plots:

Without gc()

image

With gc()

image

@DavorJ
Copy link

DavorJ commented Apr 25, 2020

Here one with 2 processes: is a bit more clear:

image

They differ on each run:

image

@DavorJ
Copy link

DavorJ commented Apr 27, 2020

Based on your unix graph

image

it seems that on unix, most of the time nothing happens. As if one process is locking the table, up until the "buffer" is full, then it bursts and unlocks it for an other process to do the same. On windows, you see one thread constantly writing while the others wait. Similar to unix with gc(), which also slows down the process much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants