Comments (4)
Problem: DanH performed a simple filter + project query over the NCCDC dataset. He observed that the scan (via SqlLite) was the dominant overhead; he observed 42 seconds of scan overhead. By contrast, Linux can scan this data in ~6 seconds, as shown below.
- time cat nccdc_edges.txt > /dev/null
cold cache: 45.4 seconds (6.4 GB / 45.4 seconds => 144 MB/sec)
warm cache: 1.6 seconds
- Raw disk performance (hdparm -t /dev/sda)
=> 148.19 MB/sec
So, these results are essentially the same. Linux can move sequential file data off the disk at ~150 MB/sec. Pretty damn fast.
Obviously, we spread the data across eight workers. So, reading the mccdc data off disk in parallel should take ~6 seconds if we were purely disk-bound and there were no other sources of overhead.
Questions:
- Where does the extra overhead come from? How much overhead does sqllite introduce? How much do we add?
- Do we get a similar warm cache speedup? The dataset is less than 1 GB per machine, which should trivially fit in the file system buffer cache. It's lame for multiple scans of the same relation to repeatedly hit disk. Memory == cheap. Keeping datasets in memory is part of why spark does so well.
from myria-web.
A sqllite dump of the same data takes 10X longer than the corresponding cat command in Linux:
- Linux cat of raw text file: 45.4 seconds
- sqllite .dump of ingested data: 451 seconds
Details
sqllite test.db
CREATE table nccdc(source varchar(64) not NULL, target varchar(64) not NULL, proto smallint, timestamp integer, col5 integer, col6 integer, col7 integer);
.separator |
.import ./nccdc_edges.txt nccdc
[leave sqllite]
time echo '.dump' | sqlite3 test.db > /dev/null
echo '.dump' 0.00s user 0.00s system 0% cpu 0.001 total
sqlite3 test.db > /dev/null 451.43s user 5.09s system 99% cpu 7:37.42 total
Note that the underlying sqllite database file was only 4% larger than the raw input file, so the slow down is not due to extra disk I/O. sqllite is just slow.
from myria-web.
Sorry to keep delving into minutiae: is it feasible to try this on
literally the same data that was taking 45s to scan in Myria? I suspect a
dump to /dev/null will also take about 45s, confirming that getting data
out of sqllite is the bottleneck.
On Tue, Sep 24, 2013 at 4:14 PM, Andrew Whitaker
[email protected]:
A sqllite dump of the same data takes 10X longer than the corresponding
cat command in Linux:
- Linux cat of raw text file: 45.4 seconds
- sqllite .dump of ingested data: 451 seconds
Details
sqllite nccdc.db
CREATE table nccdc(source varchar(64) not NULL, target varchar(64) not
NULL, proto smallint, timestamp integer, col5 integer, col6 integer, col7
integer);
.separator |.import ./nccdc_edges.txt nccdc
[leave sqllite]
time echo '.dump' | sqlite3 test.db > /dev/null
echo '.dump' 0.00s user 0.00s system 0% cpu 0.001 total
sqlite3 test.db > /dev/null 451.43s user 5.09s system 99% cpu 7:37.42 totalNote that the underlying sqllite database file was only 4% larger than the
raw input file, so the slow down is not due to extra disk I/O. sqllite is
just slow.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-25050140
.
from myria-web.
Using above methodology with a single "shard" containing 1/8 of the database:
Linux cat > /dev/null (cold cache): 5.86 seconds (= 140 MB/sec)
sqllite dump (cold cache): 58.7 seconds
Note that this result is even worse than what Dan was seeing (58 seconds compared to 45 seconds). Maybe the dump operation itself introduces some extra overhead? Both results are much worse than raw / native Linux "scans".
Another bit of sadness: I didn't observe much speedup for a successive run (i.e., with a warm cache). sqllite dump took 57.5 seconds in this case (likely just statistical noise).
from myria-web.
Related Issues (20)
- All results are listed on /datasets, making "real" datasets harder to locate HOT 1
- Add triangle query to list of examples
- Backend dropdown menu disappears on click HOT 1
- Lag when Waiting for Query Results HOT 2
- Wrong time selected
- Remove dependency on myria-python
- JSON dataset link on Results tab of query editor should open new tab/window HOT 2
- "Creating query" is not using https
- Consider sanitizing non-ASCII whitespace characters in queries HOT 1
- Remove unnecessary submodules HOT 3
- Replace raco submodule with install/develop HOT 2
- Move myria-web docs from myria-docs to myria-web HOT 1
- Expose MyriaX version in UI
- Travis is failing HOT 4
- Add a checkbox for push_sql groupby
- Refactor PerfEnforce Myria-Web Interface
- Move myria-web repo to uwdb org
- I'm not presently able to execute any of the data load data from the demo UI HOT 3
- Display informative error message when selected query language is mismatched with query
- Can't instantiate abstract class Fixpoint with abstract methods partitioning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myria-web.