Database - Sentimentron/Utah GitHub Wiki

Used the db.t2.small database type.

Total IOPs

With 3 test_write.py and 1 test_append_speed.py scripts running, database server maxed out at 800 IOP/s (about 8 MB/s), which meets the 95% baseline database throughput estimated by the model with room for keywords.

Keywords/second

Per thread, we got an insert rate of 350-500 keywords per second which almost meets the 95% level.

Latency estimation

Round-trip time is estimated at around 7ms.

rtownsend@owl:~$ ssh -i Downloads/Experiment.pem [email protected]
^C
rtownsend@owl:~$ ssh -i Downloads/Experiment.pem [email protected]
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-74-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sat Mar 12 16:04:35 UTC 2016

  System load:  0.0               Processes:           102
  Usage of /:   10.0% of 7.74GB   Users logged in:     0
  Memory usage: 2%                IP address for eth0: 172.30.0.25
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.


Last login: Sat Mar 12 16:04:39 2016 from cpc91232-cmbg18-2-0-cust85.5-4.cable.virginm.net
ubuntu@ip-172-30-0-25:~$ ping testserver.cvlta37taddl.us-east-1.rds.amazonaws.com:5432
ping: unknown host testserver.cvlta37taddl.us-east-1.rds.amazonaws.com:5432
ubuntu@ip-172-30-0-25:~$ ping testserver.cvlta37taddl.us-east-1.rds.amazonaws.com
PING ec2-52-73-243-97.compute-1.amazonaws.com (52.73.243.97) 56(84) bytes of data.
^C
--- ec2-52-73-243-97.compute-1.amazonaws.com ping statistics ---
28 packets transmitted, 0 received, 100% packet loss, time 27214ms

ubuntu@ip-172-30-0-25:~$ ping testserver.cvlta37taddl.us-east-1.rds.amazonaws.com
PING ec2-52-73-243-97.compute-1.amazonaws.com (52.73.243.97) 56(84) bytes of data.
^C
--- ec2-52-73-243-97.compute-1.amazonaws.com ping statistics ---
31 packets transmitted, 0 received, 100% packet loss, time 30239ms

ubuntu@ip-172-30-0-25:~$ ping testserver.cvlta37taddl.us-east-1.rds.amazonaws.com
PING ec2-52-73-243-97.compute-1.amazonaws.com (52.73.243.97) 56(84) bytes of data.                                                
^C                                                                                                                                
--- ec2-52-73-243-97.compute-1.amazonaws.com ping statistics ---                                                                  
3 packets transmitted, 0 received, 100% packet loss, time 2016ms                                                                  
                                                                                                                                  
ubuntu@ip-172-30-0-25:~$ sudo apt-get install htoop
sudo: unable to resolve host ip-172-30-0-25                                                                                       
Reading package lists... Done                                                                                                     
Building dependency tree       
Reading state information... Done
E: Unable to locate package htoop
ubuntu@ip-172-30-0-25:~$ sudo apt-get install htop
sudo: unable to resolve host ip-172-30-0-25
Reading package lists... Done
Building dependency tree       
real    0m0.045s
user    0m0.021s
sys     0m0.010s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)

Estimated latency: 0.013999999999999997


real    0m0.044s
user    0m0.019s
sys     0m0.012s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)
Estimated latency: 0.012999999999999998


real    0m0.045s
user    0m0.021s
sys     0m0.010s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.045s
user    0m0.016s
sys     0m0.016s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.044s
user    0m0.022s
sys     0m0.009s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.048s
user    0m0.022s
sys     0m0.009s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.046s
user    0m0.023s
sys     0m0.009s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.044s
user    0m0.022s
sys     0m0.009s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.045s
user    0m0.024s
sys     0m0.008s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.050s
user    0m0.028s
sys     0m0.005s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.045s
user    0m0.028s
sys     0m0.005s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.045s
user    0m0.028s
sys     0m0.004s
ubuntu@ip-172-30-0-25:~$ time psql -h testserver.cvlta37taddl.us-east-1.rds.amazonaws.com -d keywords -c 'select 1' -U rtownsend
 ?column? 
----------
        1
(1 row)


real    0m0.045s
user    0m0.027s
sys     0m0.005s
ubuntu@ip-172-30-0-25:~$ 
                                                                                                                                  

Append tests

Between 30-35K values per second.

ime to insert 10000 entries was 0.0283 seconds (353005.3780 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0328 seconds (305020.3259 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0277 seconds (360713.4626 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0315 seconds (317788.8229 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0284 seconds (352515.8427 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0335 seconds (298692.7974 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0299 seconds (334236.7857 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0306 seconds (327291.3415 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0276 seconds (362465.3462 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0324 seconds (308470.4827 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0334 seconds (299612.4037 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0324 seconds (308345.7574 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0323 seconds (309163.9762 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0303 seconds (330267.9591 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0307 seconds (325409.7585 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0275 seconds (363451.5866 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0313 seconds (319488.1248 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0293 seconds (340726.0823 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0378 seconds (264203.1332 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0302 seconds (331081.3435 values per         second, 3.53 % done
Time to insert 10000 entries was 0.0297 seconds (336835.0720 values per         second, 3.53 % done
⚠️ **GitHub.com Fallback** ⚠️