Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

computer becomes unresponsive with MonetDBLite working hard #20

Open
tslumley opened this issue Mar 5, 2018 · 4 comments
Open

computer becomes unresponsive with MonetDBLite working hard #20

tslumley opened this issue Mar 5, 2018 · 4 comments
Assignees

Comments

@tslumley
Copy link

tslumley commented Mar 5, 2018

On my laptop (MacBook Air, four years old) when I execute a query in MonetDBLite (from R.app) that creates a table much larger than memory, the computer becomes unresponsive while the query executes. About half the time there's the spinning beachball cursor, the other half there's a normal cursor but other applications are extremely slow to respond (eg, typing takes multiple seconds per character).

The behaviour looks similar to what you get with memory overuse and heavy paging, but it isn't: there's still free RAM. The 'Activity Monitor' still indicates 20-40% idle CPU time, but it shows that most of the CPU time being used is in the system, not in user space.

Is there some sort of checking for interrupts that MonetDBLite could do more often, or something?

@hannes
Copy link
Contributor

hannes commented Mar 6, 2018

I have to check interrupt handling again, its tricky since R and MonetDB (standalone) both mess with them. I think I disabled them for MonetDBLite. My suspicion though is that the slowdown comes from heavy IO traffic / contention with the disk, which is required when the new table is persistent (as is the case here I think).

Something you could try though is to run the table creation in single-threaded mode
(options(monetdb.sequential=T) before startup). Does this help?

@hannes hannes self-assigned this Mar 6, 2018
@tslumley
Copy link
Author

tslumley commented Mar 7, 2018

I think it's a temporary table -- and the same thing happens when the additional table only exists as the inner part of a SELECT. Stripped down, that second case is like
select sum(u) from select x*(y-mu) as u from select x,y, (1-1/exp(A+x*B)) as mu from data
where A and B are explicit numbers.

A possible argument against it being disk contention is that the Activity Monitor only shows intermittent disk activity. But I'll try the single-threaded option.

@hannes
Copy link
Contributor

hannes commented Mar 19, 2018

Did the single-thread option change anything?

@tslumley
Copy link
Author

tslumley commented Mar 19, 2018 via email

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

No branches or pull requests

2 participants