SlideShare a Scribd company logo
1 of 41
Download to read offline
P R O T I P S F O R Y O U T O S AV E 5 0 % O F
Y O U R M O N E Y W I T H G O O G L E C L O U D
E F F I C I E N C Y A N D L O W C O S T
D A N I E L C U K I E R ( G D E )
@ D A N I C U K I
http://www.flickr.com/photos/zerial/2804865447/sizes/z/in/photostream/
http://www.flickr.com/photos/bike/266453254/sizes/l/in/photostream/
http://www.flickr.com/photos/tim_d/184018928/sizes/l/in/photostream/
http://www.flickr.com/photos/stars6/4381851322/sizes/l/in/photostream/
W H AT I F…
Click!
(╯°□°)╯︵ ┻━┻
Data Center
Colocation
Physical Servers
Virtual Servers
Managed Service
Containers
Managed Container
App Engine Flex
App Engine Standard
SaaS
Praia
Low cost, high work
High cost, low work
W H E R E A R E Y O U ?
P R O T I P S F O R Y O U T O S AV E 5 0 % O F
Y O U R M O N E Y W I T H G O O G L E C L O U D
E F I C I E N C Y A N D L O W C O S T
D A N I E L C U K I E R ( G D E )
@ D A N I C U K I
S U S TA I N E D U S A G E
C O M M I T E D U S E
MACHINE
TYPE
ITEM FULL PRICE
1 YEAR
COMMITMENT
3 YEAR
COMMITMENT
CUSTOM
MACHINE
TYPES
VCPU $0.033174 /
VCPU HOUR
$0.019915 /
VCPU HOUR
$0.014225 /
VCPU HOUR
MEMORY $0.004446 / GB
HOUR
$0.002669 / GB
HOUR
$0.001907 / GB
HOUR
PREDEFINED
MACHINE
TYPES*
N1-
STANDARD-16
$0.7600 / HOUR $0.47878 / HOUR $0.34202 / HOUR
N1-
HIGHMEM-16
$0.9472 / HOUR $0.59622 / HOUR $0.42593 / HOUR
N1-
HIGHCPU-16
$0.5672 / HOUR $0.35707 / HOUR $0.25506 / HOUR
P R E E M P T I B L E
http://www.agileandart.com/2016/05/04/how-i-reduced-my-cloud-cost-using-google-cloud/
S T E P 1 : S E T U P T H E C L I E N T
T O B E FA U LT T O L E R A N T
def query(params, retries = 0) {
val response = api.query(params)
response.onSuccess {
codeForSuccess()
}
response.onFailure {
case x => {
LOG.error(s"Failure on $retries try of API request: " + x.getMessage)
Thread.sleep(retries * 3000) // this sleep is optional
query(params, retries + 1) // could have a maximum
// number of retries here
}
}
}
P R E E M P T I B L E
S T E P 2 : P U T A L L S E R V E R S
B E H I N D A L O A D B A L A N C E R
#!/bin/bash
SERVER_SUBSTRING=playax-fingerprint
EMPTY_FILE=`cat /etc/haproxy/haproxy.cfg |grep -v $SERVER_SUBSTRING`
NEW_LINES=`gcloud compute instances list |grep $SERVER_SUBSTRING | sed 's/
true//g' |sed 's/ [ ]*/ /g'|cut -d" " -f4|awk '{print " server playax-
fingerprint" $NF " " $NF ":9000 check inter 5s rise 1 fall 1 weight 1"}'`
echo "$EMPTY_FILE" >new_config
echo "$NEW_LINES" >>new_config
sudo cp new_config /etc/haproxy/haproxy.cfg
sudo ./restart.sh
P R E E M P T I B L E
S T E P 3 : C R E AT E A N I N S TA N C E
G R O U P F O R T H E S E S E R V E R S
P R E E M P T I B L E
P R E E M P T I B L E
P R E E M P T I B L E
P R E E M P T I B L E
Price reduction:  $490 or 48.6%
BEFORE AFTER
SERVERS 20 24
COST PER SERVER $0.07 $0.03
TOTAL COST PER HOUR $1.4 $0.72
TOTAL COST PER MONTH $1,008 $518
F I L E S T O R A G E
Public Processed Long Term Storage
Characteristics 99.95% availability

Geo-redundant
99.9% availability

Data stored in a
narrow
geographic region
99.0% availability

30-day minimum
storage duration
99.0% availability

90-day minimum
storage duration
Uses Cases Frequently
accessed
World Audience
Website content
Streaming video
Gaming
Mobile
Accessed by your
system
But not by your
customers
Big Data sets for
processing
Backup
Long tail
multimedia
Disaster recovery
Compliance
archives
Storage Cost

GB/month
$.026 $.02 $.01 $.007
Retrieval Cost

GB
$.01 $.05
Storage Type Multi-region Regional Nearline Coldline
F I L E S T O R A G E
E X A M P L E
$ g s u t i l d u - s g s : / / p l a y a x - re d u c e d / p ro d u c t i o n / d e t e c t i o n s
F I L E S T O R A G E
1 4 , 7 1 9 , 8 0 0 , 9 6 2 , 9 0 4 = 1 3 , 7 0 8 G B
Storage Type Multi-region Regional Nearline Coldline
Cost GB/month $0.026 $0.02 $0.01 $0.007
Cost 2 years of data / month $356 $274 $137 $95
Cost 3 months of data / month $44 $34 $17 $12
P R E E M P T I B L E
Price reduction:  $339 or 95.2%
BEFORE AFTER
GB OF DATA 13,708 2
COST / GB $0.026 $1000
COST / MONTH $356 $17
C O D E M AT T E R S
2 9 6 7 5 , 1 4 3 7 6 , 5 5 9 5 0 , 2 5 8 6 , 8 0 9 9 5 , 3 7 7 5 9 , 6 5 8 4 5 , 3 1 5 6 2 ,
1 5 8 0 0 , 4 2 7 7 5 , 9 6 5 4 2 , 2 1 4 8 5 , 9 3 7 2 8 , 5 9 0 2 2 , 7 8 8 5 4 , 9 6 6 8 ,
3 1 0 8 8 , 4 4 0 0 7 , 4 1 8 7 8 , 2 7 6 8 0 , 5 4 4 5 0 , 9 1 3 3 6 , 1 9 2 8 1 , 1 7 0 2 5 ,
7 4 9 7 8 , 3 3 9 4 2 , 2 4 6 8 9 , 2 7 2 9 1 , 5 7 0 2 4 , 3 1 9 4 7 , 9 5 7 3 9 , 9 0 7 9 4 ,
2 8 6 2 4 , 7 6 6 0 2 , 5 9 6 2 7 , 4 8 0 7 7 , 6 4 4 6 4 , 2 7 6 2 8 , 2 2 9 9 , 4 0 9 9 8 ,
3 6 0 9 9 , 1 7 9 1 , 2 1 5 6 3 , 2 9 0 7 8 , 5 8 8 4 4 , 3 2 9 5 1 , 8 1 1 0 5 , 9 9 0 3 1 ,
2 2 3 8 9 , 2 2 5 4 9 , 2 8 6 9 , 2 4 2 5 3 , 6 8 3 1 8 , 5 7 6 7 8 , 5 8 6 0 5 , 8 5 8 3 4 ,
7 9 2 3 2 , 7 6 8 9 5 , 8 4 7 1 9 , 9 1 1 1 , 9 4 2 8 5 , 8 2 6 3 9 , 3 2 2 2 6 , 2 7 2 2 4 ,
1 6 7 4 0 , 4 2 4 6 8 , 4 7 6 8 8 , 4 2 3 9 4 , 9 3 1 5 0 , 5 3 5 1 0 , 7 9 2 3 0 , 4 3 8 6 0 ,
4 2 1 0 5 , 7 3 3 8 3 , 6 4 7 1 0 , 7 2 6 6 , 3 9 3 1 3 , 8 2 2 3 5 , 9 7 6 4 9 , 4 6 6 2 6 ,
8 3 9 2 3 , 7 7 3 9 4 , 8 6 8 1 7 , 9 3 5 0 1 , 3 5 2 9 6 , 5 7 0 6 9 , 6 8 8 2 3 , 7 5 3 6 7 ,
6 0 1 6 5 , 5 9 4 9 9 , 5 5 5 6 1 , 7 1 7 8 7 , 7 3 8 4 5 , 9 8 8 8 , 3 6 2 5 7 , 2 0 8 4 4 ,
8 9 0 4 9 , 6 7 7 2 0 , 3 6 3 2 1 , 6 5 2 9 9 , 1 0 1 2 1 , 4 0 7 8 3 , 5 7 6 5 , 9 6 2 9 2 ,
5 0 6 5 , 1 2 1 8 7 , 8 2 2 3 5 , 3 2 9 3 1 , 3 7 4 0 4 , 6 5 9 5 6 , 8 0 9 8 3 , 8 9 4 3 7 ,
8 7 5 3 , 6 2 9 1 0 , 2 9 6 5 2 , 9 2 5 2 4 , 7 8 7 3 6 , 1 6 9 6 1 , 4 7 4 9 6 , 8 9 2 7 7 ,
6 6 1 0 2 , 5 6 4 9 2 , 3 2 0 4 2 , 6 1 3 5 6 , 9 7 8 5 3 , 8 0 2 7 8 , 8 7 5 5 9 , 8 2 0 2 4 ,
6 6 5 5 0 , 8 1 5 0 0 , 5 7 9 5 9 , 6 4 8 7 1 , 7 0 4 7 0 , 2 4 8 8 6 , 4 2 6 2 6 , 9 3 5 9 8 ,
7 1 6 3 , 6 9 7 7 5 , 4 4 9 1 5 , 9 7 5 3 1 , 6 1 4 3 , 9 1 5 1 , 6 7 0 3 , 4 2 1 5 6 , 2 8 6 3 6 ,
8 1 2 4 9 , 3 0 4 6 6 , 6 8 5 0 6 , 9 8 9 7 0 , 6 3 8 0 9 , 6 6 0 0 1 , 4 8 0 9 6 , 6 8 8 2 6 …
4 , 9 , 8 , 9 , 1 , 7 , 9 , 4 , 9 , 8 , 0 , 5 , 3 , 8 , 6 , 1 ,
9 , 6 , 3 , 8 , 9 , 1 , 3 , 7 , 6 , 0 , 8 , 0 , 5 , 8 , 8 , 8 ,
2 , 9 , 5 , 0 , 3 , 5 , 5 , 2 , 8 , 4 , 6 , 3 , 0 , 2 , 1 , 9 ,
6 , 1 , 9 , 1 , 6 , 1 , 4 , 1 , 4 , 5 , 3 , 6 , 3 , 3 , 6 , 8 ,
8 , 6 , 4 , 4 , 1 , 9 , 4 , 2 , 3 , 8 , 4 , 6 , 8 , 6 , 5 , 6 ,
4 , 9 , 7 , 7 , 3 , 9 , 0 , 0 , 9 , 4 , 2 , 9 , 0 , 8 , 0 , 4 ,
0 , 0 , 4 , 6 , 0
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 ,
1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 3 , 3 ,
3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
4 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 ,
6 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 8 , 8 , 8 , 8 , 8 , 8 , 8 ,
8 , 8 , 8 , 8 , 8 , 8 , 8 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 ,
9 , 9 , 9 , 9 , 9
for(IndexReader sub : reader.getSequentialSubReaders()) {
int p = 0;
for(int i = 0; i < MAX; i++) {
TermDocs td = sub.termDocs(new Term("fp", t));
int pos = td.read(docs, freqs);
while(pos != 0) {
for(int i = 0; i < pos; i++) {
if(p >= alld.length) {
alld = Arrays.copyOf(alld, alld.length * 2);
}
alld[p++] = docs[i];
}
pos = td.read(docs, freqs);
}
td.close();
}
if(p > 0) {
Arrays.sort(alld, 0, p);
int curr = alld[0];
int count = 0;
for(int i = 0; i < p; i++) {
int doc = alld[i];
if(doc == curr) {
count++;
} else {
nHits++;
curr += base;
heapCheck(h, hsize, curr, count);
curr = doc;
count = 1;
}
}
heapCheck(h, hsize, curr+base, count);
}
base += sub.maxDoc();
}
O ( n l o g n )
IntIntMap countMap = new IntIntMap(6000000, 0.9f);
for(IndexReader sub : reader.getSequentialSubReaders()) {
for(String t : termSet) {
TermDocs td = sub.termDocs(new Term("fp", t));
int pos = td.read(docs, freqs);
while(pos != 0) {
for(int i = 0; i < pos; i++) {
countMap.addOne(docs[i] + base);
if (docs[i] + base > max) {
max = docs[i] + base;
}
}
pos = td.read(docs, freqs);
}
td.close();
}
base += sub.maxDoc();
}
System.out.println("MAX: " + max);
int nHits = countMap.size();
int[] data = countMap.getData();
for (int i = 0; i < data.length - 1; i = i + 2) {
int key = data[i];
if (key != 0) {
heapCheck(h, hsize, key, data[i+1]);
}
}
O ( k n )
int[] countMap = new int[arraySize];
try {
for (IndexReader sub : reader.getSequentialSubReaders()) {
for (String t : termSet) {
TermDocs td = sub.termDocs(new Term("fp", t));
int pos = td.read(docs, freqs);
while (pos != 0) {
for (int i = 0; i < pos; i++) {
countMap[docs[i] + base]++;
}
pos = td.read(docs, freqs);
}
td.close();
}
base += sub.maxDoc();
}
} catch (ArrayIndexOutOfBoundsException e) {
increaseArraySize();
return eval(reader, queryTerms, rb, rows, start);
}
int nHits = 0;
for (int i = 0; i < countMap.length; i++) {
if (countMap[i] > 0){
nHits++;
heapCheck(h, hsize, i, countMap[i]);
}
}
O ( n )
P R E E M P T I B L E
Price reduction:  $2000 or 66.6%
BEFORE AFTER
NUMBER OF SERVERS 6 2
COST / MONTH $3000 $1000
R I G H T S I Z I N G
R E C O M M E N D AT I O N S
E X T R A F O R S TA R T U S
• Home Office > co-working > Office
• Equity offers for developers
• Used equipment and furniture at auctions websites
• Government or universities programs (ex: startup Chile,
Startup Brazil, PIPE-FAPESP, USA NSF-ISBIR, Israel
OCS, etc.)
• Use cloud providers programs for startups to save costs
with infrastructure. Google, Rackspace, Microsoft,
Amazon, and others offer until US$100.000 for one year.
https://www.researchgate.net/publication/318429624
S TA R T U P C R E D I T S
https://cloud.google.com/developers/startups/
L U C K
B E C R E AT I V E
W H AT A B O U T Y O U ?
T W E E T T O @ D A N I C U K I W I T H # G C P S AV I N G S
D A7 F#m
Lembro quando a vida era difícil
F#m B7 Em A7
O servidor tinha vontade própria e dava pau
F#m B7 Em
O chefe reclamava o tempo inteiro
G Em A7 D
O senhor não vai gastar mais nenhum real
A7 D
Agora eu vou economizar
A7 A7add4 A7
Mudei pra nuvem
A7 G D
A minha alma hoje é meu celular
A7 A7add4
E todo o resto, todo resto
A7
eu dei pro Google
D
Eles que cuidem
D A7 D
Economizar,
D A7 G A7 D
com Google Cloud você vai economizar
D A7 D
Economizar,
D A7 G A7 D
com Google Cloud sei que vou economizar
D A7 D
Foi numa manhã de 6a. feira
D A7 D
Que me deu um ataque de fúria
B7 Em
Arremecei um extintor
A7 D
No armário do servidor
B7
E saí cortando
Em
todos os cabos de rede
A7 D
Explodi o roteador
B7 Em
Dei chute no monitor
A7 D
Joguei tudo na parede
“Nuvens… Hoje tenho consciência do céu, pois há dias em que
não o olho mas sinto, vivendo na cidade e não na natureza que a
inclui. Nuvens… São elas hoje a principal realidade, e preocupam-
me como se o velar do céu fosse um dos grandes perigos de meu
destino. Nuvens… Passam da barra para o Castelo, de Ocidente
para Oriente, num tumulto disperso e despido, branco às vezes, se
vão esfarrapadas na vanguarda de não sei o quê; meio-negro outras,
se, mais lentas, tardam em ser varridas pelo vento audível; negras de
um branco sujo, se, como se quisessem ficar, enegrecem mais da
vinda que da sombra o que as ruas abrem de falso espaço entre as
linhas fechadoras da casaria” Fernando Pessoa

More Related Content

Similar to Eficiency and Low Cost: Pro Tips for you to save 50% of your money with Google Cloud

Tableau for statistical graphic and data visualization
Tableau for statistical graphic and data visualizationTableau for statistical graphic and data visualization
Tableau for statistical graphic and data visualizationBAINIDA
 
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...Amazon Web Services
 
Good Enough Analytics
Good Enough AnalyticsGood Enough Analytics
Good Enough AnalyticsKai Xin Thia
 
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...Christian Beedgen
 
Data and Behavior Change: Is Seeing Believing, and is That Enough?
Data and Behavior Change: Is Seeing Believing, and is That Enough?Data and Behavior Change: Is Seeing Believing, and is That Enough?
Data and Behavior Change: Is Seeing Believing, and is That Enough?Sustainable Brands
 
September 24, 2013 Special Meeting Agenda packet
September 24, 2013 Special Meeting Agenda packetSeptember 24, 2013 Special Meeting Agenda packet
September 24, 2013 Special Meeting Agenda packetCity of San Angelo Texas
 
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッション
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッションAWS Manga 「なな転び八起のAWS開発日記」スペシャルセッション
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッションAmazon Web Services Japan
 
DSD-INT 2016 Urban water modelling - Meijer
DSD-INT 2016 Urban water modelling - MeijerDSD-INT 2016 Urban water modelling - Meijer
DSD-INT 2016 Urban water modelling - MeijerDeltares
 
Your App Metrics Are Telling You How To Make Them Better: The Digits Data Report
Your App Metrics Are Telling You How To Make Them Better: The Digits Data ReportYour App Metrics Are Telling You How To Make Them Better: The Digits Data Report
Your App Metrics Are Telling You How To Make Them Better: The Digits Data ReportBraze (formerly Appboy)
 
Election 2016: Mobile Activity in the U.S. on Election Day
Election 2016: Mobile Activity in the U.S. on Election DayElection 2016: Mobile Activity in the U.S. on Election Day
Election 2016: Mobile Activity in the U.S. on Election DayBraze (formerly Appboy)
 
More Reliable Delivery with Monte Carlo & Story Mapping
More Reliable Delivery with Monte Carlo & Story MappingMore Reliable Delivery with Monte Carlo & Story Mapping
More Reliable Delivery with Monte Carlo & Story MappingConal Scanlon
 
Distribucion geografica de las areas de demanda de servicios
Distribucion geografica de las areas de demanda de serviciosDistribucion geografica de las areas de demanda de servicios
Distribucion geografica de las areas de demanda de serviciosCECY50
 
Resultados 2 série
Resultados 2 sérieResultados 2 série
Resultados 2 sérieguest3492c4
 
Resultados 3 série
Resultados 3 sérieResultados 3 série
Resultados 3 sérieguest3492c4
 
Resultados 1 série
Resultados 1 sérieResultados 1 série
Resultados 1 sérieguest3492c4
 
Matriz ensamblada
Matriz ensambladaMatriz ensamblada
Matriz ensambladairanchoque1
 
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics EngineLDBC council
 
Game On: gamified CRM systems
Game On: gamified CRM systemsGame On: gamified CRM systems
Game On: gamified CRM systemsPete Baikins
 

Similar to Eficiency and Low Cost: Pro Tips for you to save 50% of your money with Google Cloud (20)

Tableau for statistical graphic and data visualization
Tableau for statistical graphic and data visualizationTableau for statistical graphic and data visualization
Tableau for statistical graphic and data visualization
 
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...
(APP203) How Sumo Logic and Anki Build Highly Resilient Services on AWS to Ma...
 
Good Enough Analytics
Good Enough AnalyticsGood Enough Analytics
Good Enough Analytics
 
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...
How Sumo Logic And Anki Build Highly Resilient Services On AWS To Manage Mass...
 
Data and Behavior Change: Is Seeing Believing, and is That Enough?
Data and Behavior Change: Is Seeing Believing, and is That Enough?Data and Behavior Change: Is Seeing Believing, and is That Enough?
Data and Behavior Change: Is Seeing Believing, and is That Enough?
 
September 24, 2013 Special Meeting Agenda packet
September 24, 2013 Special Meeting Agenda packetSeptember 24, 2013 Special Meeting Agenda packet
September 24, 2013 Special Meeting Agenda packet
 
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッション
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッションAWS Manga 「なな転び八起のAWS開発日記」スペシャルセッション
AWS Manga 「なな転び八起のAWS開発日記」スペシャルセッション
 
DSD-INT 2016 Urban water modelling - Meijer
DSD-INT 2016 Urban water modelling - MeijerDSD-INT 2016 Urban water modelling - Meijer
DSD-INT 2016 Urban water modelling - Meijer
 
Your App Metrics Are Telling You How To Make Them Better: The Digits Data Report
Your App Metrics Are Telling You How To Make Them Better: The Digits Data ReportYour App Metrics Are Telling You How To Make Them Better: The Digits Data Report
Your App Metrics Are Telling You How To Make Them Better: The Digits Data Report
 
Election 2016: Mobile Activity in the U.S. on Election Day
Election 2016: Mobile Activity in the U.S. on Election DayElection 2016: Mobile Activity in the U.S. on Election Day
Election 2016: Mobile Activity in the U.S. on Election Day
 
More Reliable Delivery with Monte Carlo & Story Mapping
More Reliable Delivery with Monte Carlo & Story MappingMore Reliable Delivery with Monte Carlo & Story Mapping
More Reliable Delivery with Monte Carlo & Story Mapping
 
Distribucion geografica de las areas de demanda de servicios
Distribucion geografica de las areas de demanda de serviciosDistribucion geografica de las areas de demanda de servicios
Distribucion geografica de las areas de demanda de servicios
 
Resultados 2 série
Resultados 2 sérieResultados 2 série
Resultados 2 série
 
Resultados 2 série
Resultados 2 sérieResultados 2 série
Resultados 2 série
 
Resultados 3 série
Resultados 3 sérieResultados 3 série
Resultados 3 série
 
Resultados 1 série
Resultados 1 sérieResultados 1 série
Resultados 1 série
 
Matriz ensamblada
Matriz ensambladaMatriz ensamblada
Matriz ensamblada
 
Ejecución presupuestal
Ejecución presupuestalEjecución presupuestal
Ejecución presupuestal
 
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine
8th TUC Meeting – Yinglong Xia (Huawei), Big Graph Analytics Engine
 
Game On: gamified CRM systems
Game On: gamified CRM systemsGame On: gamified CRM systems
Game On: gamified CRM systems
 

More from Daniel Cukier

Solidity: Zero to Hero Corporate Training
Solidity: Zero to Hero Corporate TrainingSolidity: Zero to Hero Corporate Training
Solidity: Zero to Hero Corporate TrainingDaniel Cukier
 
Spring e Injeção de Dependência
Spring e Injeção de DependênciaSpring e Injeção de Dependência
Spring e Injeção de DependênciaDaniel Cukier
 
Startup Communities: From Nascence to Maturity
Startup Communities: From Nascence to MaturityStartup Communities: From Nascence to Maturity
Startup Communities: From Nascence to MaturityDaniel Cukier
 
Technology Startups Ecosystem in China - Lessons to other ecosystems
Technology Startups  Ecosystem in China - Lessons to other ecosystemsTechnology Startups  Ecosystem in China - Lessons to other ecosystems
Technology Startups Ecosystem in China - Lessons to other ecosystemsDaniel Cukier
 
Software Startup Ecosystems Evolution - The New York City Case Study
Software Startup Ecosystems Evolution - The New York City Case StudySoftware Startup Ecosystems Evolution - The New York City Case Study
Software Startup Ecosystems Evolution - The New York City Case StudyDaniel Cukier
 
Maturity model for Startup Ecosystems
Maturity model for Startup EcosystemsMaturity model for Startup Ecosystems
Maturity model for Startup EcosystemsDaniel Cukier
 
Why Google Cloud is so special? Stories from a cloud user
Why Google Cloud is so special?  Stories from a cloud userWhy Google Cloud is so special?  Stories from a cloud user
Why Google Cloud is so special? Stories from a cloud userDaniel Cukier
 
Software Architectures for a Single Person Team
Software Architectures for a Single Person TeamSoftware Architectures for a Single Person Team
Software Architectures for a Single Person TeamDaniel Cukier
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaDaniel Cukier
 
O dia a dia de uma Startup
O dia a dia de uma StartupO dia a dia de uma Startup
O dia a dia de uma StartupDaniel Cukier
 
Injeção de Dependência e Testes com Dublês
Injeção de Dependência e Testes com DublêsInjeção de Dependência e Testes com Dublês
Injeção de Dependência e Testes com DublêsDaniel Cukier
 
Selecting Empirical Methods for Software Engineering
Selecting Empirical Methods for Software EngineeringSelecting Empirical Methods for Software Engineering
Selecting Empirical Methods for Software EngineeringDaniel Cukier
 
Is Computer Science Science?
Is Computer Science Science?Is Computer Science Science?
Is Computer Science Science?Daniel Cukier
 
Better Science Through Art
Better Science Through ArtBetter Science Through Art
Better Science Through ArtDaniel Cukier
 
Designed as Designer
Designed as DesignerDesigned as Designer
Designed as DesignerDaniel Cukier
 
When Should You Consider Meta Architectures
When Should You Consider Meta ArchitecturesWhen Should You Consider Meta Architectures
When Should You Consider Meta ArchitecturesDaniel Cukier
 

More from Daniel Cukier (20)

Solidity: Zero to Hero Corporate Training
Solidity: Zero to Hero Corporate TrainingSolidity: Zero to Hero Corporate Training
Solidity: Zero to Hero Corporate Training
 
Spring e Injeção de Dependência
Spring e Injeção de DependênciaSpring e Injeção de Dependência
Spring e Injeção de Dependência
 
Pair programming
Pair programmingPair programming
Pair programming
 
Startup Communities: From Nascence to Maturity
Startup Communities: From Nascence to MaturityStartup Communities: From Nascence to Maturity
Startup Communities: From Nascence to Maturity
 
Technology Startups Ecosystem in China - Lessons to other ecosystems
Technology Startups  Ecosystem in China - Lessons to other ecosystemsTechnology Startups  Ecosystem in China - Lessons to other ecosystems
Technology Startups Ecosystem in China - Lessons to other ecosystems
 
Software Startup Ecosystems Evolution - The New York City Case Study
Software Startup Ecosystems Evolution - The New York City Case StudySoftware Startup Ecosystems Evolution - The New York City Case Study
Software Startup Ecosystems Evolution - The New York City Case Study
 
Maturity model for Startup Ecosystems
Maturity model for Startup EcosystemsMaturity model for Startup Ecosystems
Maturity model for Startup Ecosystems
 
Why Google Cloud is so special? Stories from a cloud user
Why Google Cloud is so special?  Stories from a cloud userWhy Google Cloud is so special?  Stories from a cloud user
Why Google Cloud is so special? Stories from a cloud user
 
Software Architectures for a Single Person Team
Software Architectures for a Single Person TeamSoftware Architectures for a Single Person Team
Software Architectures for a Single Person Team
 
Startup Communities
Startup CommunitiesStartup Communities
Startup Communities
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
O dia a dia de uma Startup
O dia a dia de uma StartupO dia a dia de uma Startup
O dia a dia de uma Startup
 
Injeção de Dependência e Testes com Dublês
Injeção de Dependência e Testes com DublêsInjeção de Dependência e Testes com Dublês
Injeção de Dependência e Testes com Dublês
 
Selecting Empirical Methods for Software Engineering
Selecting Empirical Methods for Software EngineeringSelecting Empirical Methods for Software Engineering
Selecting Empirical Methods for Software Engineering
 
Is Computer Science Science?
Is Computer Science Science?Is Computer Science Science?
Is Computer Science Science?
 
Ruby Robots
Ruby RobotsRuby Robots
Ruby Robots
 
Better Science Through Art
Better Science Through ArtBetter Science Through Art
Better Science Through Art
 
Designed as Designer
Designed as DesignerDesigned as Designer
Designed as Designer
 
When Should You Consider Meta Architectures
When Should You Consider Meta ArchitecturesWhen Should You Consider Meta Architectures
When Should You Consider Meta Architectures
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Eficiency and Low Cost: Pro Tips for you to save 50% of your money with Google Cloud

  • 1. P R O T I P S F O R Y O U T O S AV E 5 0 % O F Y O U R M O N E Y W I T H G O O G L E C L O U D E F F I C I E N C Y A N D L O W C O S T D A N I E L C U K I E R ( G D E ) @ D A N I C U K I
  • 2.
  • 7. W H AT I F…
  • 9.
  • 11. Data Center Colocation Physical Servers Virtual Servers Managed Service Containers Managed Container App Engine Flex App Engine Standard SaaS Praia Low cost, high work High cost, low work W H E R E A R E Y O U ?
  • 12. P R O T I P S F O R Y O U T O S AV E 5 0 % O F Y O U R M O N E Y W I T H G O O G L E C L O U D E F I C I E N C Y A N D L O W C O S T D A N I E L C U K I E R ( G D E ) @ D A N I C U K I
  • 13. S U S TA I N E D U S A G E
  • 14. C O M M I T E D U S E MACHINE TYPE ITEM FULL PRICE 1 YEAR COMMITMENT 3 YEAR COMMITMENT CUSTOM MACHINE TYPES VCPU $0.033174 / VCPU HOUR $0.019915 / VCPU HOUR $0.014225 / VCPU HOUR MEMORY $0.004446 / GB HOUR $0.002669 / GB HOUR $0.001907 / GB HOUR PREDEFINED MACHINE TYPES* N1- STANDARD-16 $0.7600 / HOUR $0.47878 / HOUR $0.34202 / HOUR N1- HIGHMEM-16 $0.9472 / HOUR $0.59622 / HOUR $0.42593 / HOUR N1- HIGHCPU-16 $0.5672 / HOUR $0.35707 / HOUR $0.25506 / HOUR
  • 15. P R E E M P T I B L E http://www.agileandart.com/2016/05/04/how-i-reduced-my-cloud-cost-using-google-cloud/
  • 16. S T E P 1 : S E T U P T H E C L I E N T T O B E FA U LT T O L E R A N T def query(params, retries = 0) { val response = api.query(params) response.onSuccess { codeForSuccess() } response.onFailure { case x => { LOG.error(s"Failure on $retries try of API request: " + x.getMessage) Thread.sleep(retries * 3000) // this sleep is optional query(params, retries + 1) // could have a maximum // number of retries here } } } P R E E M P T I B L E
  • 17. S T E P 2 : P U T A L L S E R V E R S B E H I N D A L O A D B A L A N C E R #!/bin/bash SERVER_SUBSTRING=playax-fingerprint EMPTY_FILE=`cat /etc/haproxy/haproxy.cfg |grep -v $SERVER_SUBSTRING` NEW_LINES=`gcloud compute instances list |grep $SERVER_SUBSTRING | sed 's/ true//g' |sed 's/ [ ]*/ /g'|cut -d" " -f4|awk '{print " server playax- fingerprint" $NF " " $NF ":9000 check inter 5s rise 1 fall 1 weight 1"}'` echo "$EMPTY_FILE" >new_config echo "$NEW_LINES" >>new_config sudo cp new_config /etc/haproxy/haproxy.cfg sudo ./restart.sh P R E E M P T I B L E
  • 18. S T E P 3 : C R E AT E A N I N S TA N C E G R O U P F O R T H E S E S E R V E R S P R E E M P T I B L E
  • 19. P R E E M P T I B L E
  • 20. P R E E M P T I B L E
  • 21. P R E E M P T I B L E Price reduction:  $490 or 48.6% BEFORE AFTER SERVERS 20 24 COST PER SERVER $0.07 $0.03 TOTAL COST PER HOUR $1.4 $0.72 TOTAL COST PER MONTH $1,008 $518
  • 22. F I L E S T O R A G E
  • 23. Public Processed Long Term Storage Characteristics 99.95% availability
 Geo-redundant 99.9% availability
 Data stored in a narrow geographic region 99.0% availability
 30-day minimum storage duration 99.0% availability
 90-day minimum storage duration Uses Cases Frequently accessed World Audience Website content Streaming video Gaming Mobile Accessed by your system But not by your customers Big Data sets for processing Backup Long tail multimedia Disaster recovery Compliance archives Storage Cost
 GB/month $.026 $.02 $.01 $.007 Retrieval Cost
 GB $.01 $.05 Storage Type Multi-region Regional Nearline Coldline F I L E S T O R A G E
  • 24. E X A M P L E $ g s u t i l d u - s g s : / / p l a y a x - re d u c e d / p ro d u c t i o n / d e t e c t i o n s F I L E S T O R A G E 1 4 , 7 1 9 , 8 0 0 , 9 6 2 , 9 0 4 = 1 3 , 7 0 8 G B Storage Type Multi-region Regional Nearline Coldline Cost GB/month $0.026 $0.02 $0.01 $0.007 Cost 2 years of data / month $356 $274 $137 $95 Cost 3 months of data / month $44 $34 $17 $12
  • 25. P R E E M P T I B L E Price reduction:  $339 or 95.2% BEFORE AFTER GB OF DATA 13,708 2 COST / GB $0.026 $1000 COST / MONTH $356 $17
  • 26. C O D E M AT T E R S
  • 27. 2 9 6 7 5 , 1 4 3 7 6 , 5 5 9 5 0 , 2 5 8 6 , 8 0 9 9 5 , 3 7 7 5 9 , 6 5 8 4 5 , 3 1 5 6 2 , 1 5 8 0 0 , 4 2 7 7 5 , 9 6 5 4 2 , 2 1 4 8 5 , 9 3 7 2 8 , 5 9 0 2 2 , 7 8 8 5 4 , 9 6 6 8 , 3 1 0 8 8 , 4 4 0 0 7 , 4 1 8 7 8 , 2 7 6 8 0 , 5 4 4 5 0 , 9 1 3 3 6 , 1 9 2 8 1 , 1 7 0 2 5 , 7 4 9 7 8 , 3 3 9 4 2 , 2 4 6 8 9 , 2 7 2 9 1 , 5 7 0 2 4 , 3 1 9 4 7 , 9 5 7 3 9 , 9 0 7 9 4 , 2 8 6 2 4 , 7 6 6 0 2 , 5 9 6 2 7 , 4 8 0 7 7 , 6 4 4 6 4 , 2 7 6 2 8 , 2 2 9 9 , 4 0 9 9 8 , 3 6 0 9 9 , 1 7 9 1 , 2 1 5 6 3 , 2 9 0 7 8 , 5 8 8 4 4 , 3 2 9 5 1 , 8 1 1 0 5 , 9 9 0 3 1 , 2 2 3 8 9 , 2 2 5 4 9 , 2 8 6 9 , 2 4 2 5 3 , 6 8 3 1 8 , 5 7 6 7 8 , 5 8 6 0 5 , 8 5 8 3 4 , 7 9 2 3 2 , 7 6 8 9 5 , 8 4 7 1 9 , 9 1 1 1 , 9 4 2 8 5 , 8 2 6 3 9 , 3 2 2 2 6 , 2 7 2 2 4 , 1 6 7 4 0 , 4 2 4 6 8 , 4 7 6 8 8 , 4 2 3 9 4 , 9 3 1 5 0 , 5 3 5 1 0 , 7 9 2 3 0 , 4 3 8 6 0 , 4 2 1 0 5 , 7 3 3 8 3 , 6 4 7 1 0 , 7 2 6 6 , 3 9 3 1 3 , 8 2 2 3 5 , 9 7 6 4 9 , 4 6 6 2 6 , 8 3 9 2 3 , 7 7 3 9 4 , 8 6 8 1 7 , 9 3 5 0 1 , 3 5 2 9 6 , 5 7 0 6 9 , 6 8 8 2 3 , 7 5 3 6 7 , 6 0 1 6 5 , 5 9 4 9 9 , 5 5 5 6 1 , 7 1 7 8 7 , 7 3 8 4 5 , 9 8 8 8 , 3 6 2 5 7 , 2 0 8 4 4 , 8 9 0 4 9 , 6 7 7 2 0 , 3 6 3 2 1 , 6 5 2 9 9 , 1 0 1 2 1 , 4 0 7 8 3 , 5 7 6 5 , 9 6 2 9 2 , 5 0 6 5 , 1 2 1 8 7 , 8 2 2 3 5 , 3 2 9 3 1 , 3 7 4 0 4 , 6 5 9 5 6 , 8 0 9 8 3 , 8 9 4 3 7 , 8 7 5 3 , 6 2 9 1 0 , 2 9 6 5 2 , 9 2 5 2 4 , 7 8 7 3 6 , 1 6 9 6 1 , 4 7 4 9 6 , 8 9 2 7 7 , 6 6 1 0 2 , 5 6 4 9 2 , 3 2 0 4 2 , 6 1 3 5 6 , 9 7 8 5 3 , 8 0 2 7 8 , 8 7 5 5 9 , 8 2 0 2 4 , 6 6 5 5 0 , 8 1 5 0 0 , 5 7 9 5 9 , 6 4 8 7 1 , 7 0 4 7 0 , 2 4 8 8 6 , 4 2 6 2 6 , 9 3 5 9 8 , 7 1 6 3 , 6 9 7 7 5 , 4 4 9 1 5 , 9 7 5 3 1 , 6 1 4 3 , 9 1 5 1 , 6 7 0 3 , 4 2 1 5 6 , 2 8 6 3 6 , 8 1 2 4 9 , 3 0 4 6 6 , 6 8 5 0 6 , 9 8 9 7 0 , 6 3 8 0 9 , 6 6 0 0 1 , 4 8 0 9 6 , 6 8 8 2 6 …
  • 28. 4 , 9 , 8 , 9 , 1 , 7 , 9 , 4 , 9 , 8 , 0 , 5 , 3 , 8 , 6 , 1 , 9 , 6 , 3 , 8 , 9 , 1 , 3 , 7 , 6 , 0 , 8 , 0 , 5 , 8 , 8 , 8 , 2 , 9 , 5 , 0 , 3 , 5 , 5 , 2 , 8 , 4 , 6 , 3 , 0 , 2 , 1 , 9 , 6 , 1 , 9 , 1 , 6 , 1 , 4 , 1 , 4 , 5 , 3 , 6 , 3 , 3 , 6 , 8 , 8 , 6 , 4 , 4 , 1 , 9 , 4 , 2 , 3 , 8 , 4 , 6 , 8 , 6 , 5 , 6 , 4 , 9 , 7 , 7 , 3 , 9 , 0 , 0 , 9 , 4 , 2 , 9 , 0 , 8 , 0 , 4 , 0 , 0 , 4 , 6 , 0
  • 29. 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9
  • 30. for(IndexReader sub : reader.getSequentialSubReaders()) { int p = 0; for(int i = 0; i < MAX; i++) { TermDocs td = sub.termDocs(new Term("fp", t)); int pos = td.read(docs, freqs); while(pos != 0) { for(int i = 0; i < pos; i++) { if(p >= alld.length) { alld = Arrays.copyOf(alld, alld.length * 2); } alld[p++] = docs[i]; } pos = td.read(docs, freqs); } td.close(); } if(p > 0) { Arrays.sort(alld, 0, p); int curr = alld[0]; int count = 0; for(int i = 0; i < p; i++) { int doc = alld[i]; if(doc == curr) { count++; } else { nHits++; curr += base; heapCheck(h, hsize, curr, count); curr = doc; count = 1; } } heapCheck(h, hsize, curr+base, count); } base += sub.maxDoc(); } O ( n l o g n )
  • 31. IntIntMap countMap = new IntIntMap(6000000, 0.9f); for(IndexReader sub : reader.getSequentialSubReaders()) { for(String t : termSet) { TermDocs td = sub.termDocs(new Term("fp", t)); int pos = td.read(docs, freqs); while(pos != 0) { for(int i = 0; i < pos; i++) { countMap.addOne(docs[i] + base); if (docs[i] + base > max) { max = docs[i] + base; } } pos = td.read(docs, freqs); } td.close(); } base += sub.maxDoc(); } System.out.println("MAX: " + max); int nHits = countMap.size(); int[] data = countMap.getData(); for (int i = 0; i < data.length - 1; i = i + 2) { int key = data[i]; if (key != 0) { heapCheck(h, hsize, key, data[i+1]); } } O ( k n )
  • 32. int[] countMap = new int[arraySize]; try { for (IndexReader sub : reader.getSequentialSubReaders()) { for (String t : termSet) { TermDocs td = sub.termDocs(new Term("fp", t)); int pos = td.read(docs, freqs); while (pos != 0) { for (int i = 0; i < pos; i++) { countMap[docs[i] + base]++; } pos = td.read(docs, freqs); } td.close(); } base += sub.maxDoc(); } } catch (ArrayIndexOutOfBoundsException e) { increaseArraySize(); return eval(reader, queryTerms, rb, rows, start); } int nHits = 0; for (int i = 0; i < countMap.length; i++) { if (countMap[i] > 0){ nHits++; heapCheck(h, hsize, i, countMap[i]); } } O ( n )
  • 33. P R E E M P T I B L E Price reduction:  $2000 or 66.6% BEFORE AFTER NUMBER OF SERVERS 6 2 COST / MONTH $3000 $1000
  • 34. R I G H T S I Z I N G R E C O M M E N D AT I O N S
  • 35. E X T R A F O R S TA R T U S • Home Office > co-working > Office • Equity offers for developers • Used equipment and furniture at auctions websites • Government or universities programs (ex: startup Chile, Startup Brazil, PIPE-FAPESP, USA NSF-ISBIR, Israel OCS, etc.) • Use cloud providers programs for startups to save costs with infrastructure. Google, Rackspace, Microsoft, Amazon, and others offer until US$100.000 for one year. https://www.researchgate.net/publication/318429624
  • 36. S TA R T U P C R E D I T S https://cloud.google.com/developers/startups/
  • 37. L U C K
  • 38. B E C R E AT I V E
  • 39. W H AT A B O U T Y O U ? T W E E T T O @ D A N I C U K I W I T H # G C P S AV I N G S
  • 40. D A7 F#m Lembro quando a vida era difícil F#m B7 Em A7 O servidor tinha vontade própria e dava pau F#m B7 Em O chefe reclamava o tempo inteiro G Em A7 D O senhor não vai gastar mais nenhum real A7 D Agora eu vou economizar A7 A7add4 A7 Mudei pra nuvem A7 G D A minha alma hoje é meu celular A7 A7add4 E todo o resto, todo resto A7 eu dei pro Google D Eles que cuidem D A7 D Economizar, D A7 G A7 D com Google Cloud você vai economizar D A7 D Economizar, D A7 G A7 D com Google Cloud sei que vou economizar D A7 D Foi numa manhã de 6a. feira D A7 D Que me deu um ataque de fúria B7 Em Arremecei um extintor A7 D No armário do servidor B7 E saí cortando Em todos os cabos de rede A7 D Explodi o roteador B7 Em Dei chute no monitor A7 D Joguei tudo na parede
  • 41. “Nuvens… Hoje tenho consciência do céu, pois há dias em que não o olho mas sinto, vivendo na cidade e não na natureza que a inclui. Nuvens… São elas hoje a principal realidade, e preocupam- me como se o velar do céu fosse um dos grandes perigos de meu destino. Nuvens… Passam da barra para o Castelo, de Ocidente para Oriente, num tumulto disperso e despido, branco às vezes, se vão esfarrapadas na vanguarda de não sei o quê; meio-negro outras, se, mais lentas, tardam em ser varridas pelo vento audível; negras de um branco sujo, se, como se quisessem ficar, enegrecem mais da vinda que da sombra o que as ruas abrem de falso espaço entre as linhas fechadoras da casaria” Fernando Pessoa