SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
¿Open Solaris y
       Postgresql?
Por lo menos, tenés que escucharlos...


  Emanuel Calvo Franco @ AOSUG
“Postgresql y Solaris conforman una
plataforma de bajo costo para escenarios
críticos de mediana a gran escala.”
¿ Que es Postgresql ?
Base de Datos Objeto Relacional.
Arquitectura Cliente -Servidor.
 Estable, capaz de correr con escasos recursos,
segura y extensible.
Características de Postgresql
MVCC.
PITR
ACID compliant.
Mejorada para Solaris.
Standard SQL:2003
Funciones criptográficas avanzadas.
Diversos lenguajes procedurales.
Solaris + Pgsql
Soporte Dtrace.
Escalabilidad para multinucleos y procesadores.
Solaris Cluster support and the PostgreSQL HA Agent
Solaris Service Manager integration.
Benchmarks
Benchmarks
Benchmarks
Derby




    Mysql




Postgresql                                           Postgresql
                                                     Other




   Oracle




Greenplum




             0   2   4   6   8   10   12   14   16
Características
Más beneficios con Solaris

• Sun Cluster support
  > Sun Cluster agent available
  > Fully supported
• ZFS + Zones for Hot Standby
  > ZFS cloning & replication lets you “clone” your database
  > Zones allows you to “clone” your DB server
  > OmniTI is using this technique to support a 6TB data warehouse
on PostgreSQL
Zonas ... + seguridad

  • Zones are Perfect for “hosted” PostgreSQL
 > allows 100% isolation of PostgreSQL instances per
                 customer/application
   > set CPU & RAM limits for each Zone (in SXDE)
          > PostgreSQL can't do this natively
    > no per-user limits, no ability to hide the system tables
> Being used by Joyent.com to host 100's of customers.
Instalando
Instalar (usando Sun Studio -
    Homo Simplus Compilatus ® )
# ./configure --prefix=/usr/local/pg824 CC=/opt/SUNWspro/bin/cc CFLAGS=quot;-
xO3 -xarch=native -xspace -W0,-Lt -W2,-Rcond_elim -Xa -xildoff -xc99=none
-xCCquot; –without-readline –with-perl –with-python –enable-dtrace
# gmake
# gmake install
# useradd postgres
# groupadd postgres
# useradd -c 'PostgreSQL user' -d /export/home/postgres -g postgres -m -s /bin/
bash postgres
postgres$ $PG_BIN/initdb -D /data -U postgres
Instalar II
emanuel@opensolaris_test:~$ pfexec su - postgres
Sun Microsystems Inc. SunOS 5.11         snv_101b November 2008
-bash-3.2$ ls
bin    data84 include lib     share
-bash-3.2$ bin/post
postgres   postmaster
-bash-3.2$ bin/pg_ctl -D data84/ start
server starting
-bash-3.2$ LOG: database system was shut down at 2009-05-18 18:18:51 ART
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
Instalar (usando Sun Studio -
          Homo Paquetus ® )
# pkg install SUNWpostgr83server && pkg install SUNWpostgr83client
(ultimo en el repo SUNWpostgr-83-server@8.3.4-0.101)
- Levantar el servicio:
# svcadm enable svc:/application/database/postgresql_83:default_32bit
# /usr/sbin/svcadm enable postgresql:version_82
Zonas
Ejemplo simple de una zona
global# zonecfg -z pg_zone                            ######instalo

zonecfg:pg_zone> create                               global# zoneadm -z pg_zone install
zonecfg:pg_zone> set zonepath=/export/zones/pg_zone   ########listo
zonecfg:pg_zone> set autoboot=true                    global# zoneadm list -iv
zonecfg:pg_zone> add net                              ########booteo
zonecfg:pg_zone:net> set address=10.6.222.74/24       global# zoneadm -z pg_zone boot
zonecfg:pg_zone:net> set physical=ipge0               #######logueo
zonecfg:pg_zone:net> end                              global# zlogin -C pg_zone
zonecfg:pg_zone> verify

zonecfg:pg_zone> commit
zonecfg:pg_zone> exit
ZFS
Very simple tricks
# zfs create -b 8192 rpool/data
# zfs list
# zfs set mountpoint=data84 rpool/data84
# zfs set mountpoint=$PWD/data84 rpool/data84
# zfs set compression=on rpool/data84
# zfs list
# zfs set quota=1g rpool/data84
# zfs set reservation=100m rpool/data84
# zfs set sharenfs=rw rpool/data84
# zpool list
# zfs list
DTrace
Script D
#!/usr/sbin/dtrace -s

syscall:::entry

/execname== quot;postgresquot;/

{

self->ts=timestamp;

}

syscall:::return

/execname== quot;postgresquot; && self->ts/

{

@a[quot;Countquot;,probefunc] = count();

@b[quot;Timequot;,probefunc] = sum (timestamp - self->ts);

self->ts=0;

}

tick-10sec

{

exit(0);

}
Ejemplo
root@opensolaris_test:/usr/local/postgres_home_84# ./syscall.d
dtrace: script './syscall.d' matched 471 probes
CPU      ID            FUNCTION:NAME
 0 55976                :tick-10sec
 Count                                gtime                          47
 Count                                pollsys                        105
 Count                                getpid                         109
 Time                                 gtime                       8438387
 Time                                 getpid                      29391576
 Time                                 pollsys                    36537963468
Medición de Transacciones
#!/usr/sbin/dtrace -qs                profile:::tick-1s

postgresql*:::transaction-start       {

{                                     printf(quot;******** Transactions Per Second
                                      *********nquot;);
@startpersec[quot;Newquot;] = count();
                                      printf(quot;%20s %15snquot;, quot;Txn Typequot;, quot;Countquot;);
}
                                      printf(quot;============================
postgresql*:::transaction-commit      ==============nquot;);
{                                     printa(quot;%20s %@15dnquot;, @startpersec);
@commitpersec[ quot;Commitquot;] = count();   printa(quot;%20s %@15dnquot;, @commitpersec);
}                                     printa(quot;%20s %@15dnquot;, @abort);
postgresql*:::transaction-abort            printf(quot;nquot;);
{                                     clear(@startpersec);
@abort[quot;Abortquot;] = count();            clear(@commitpersec);
}                                     clear(@abort); }
Salida
******** Transactions Per Second *********

       Txn Type        Count

==========================================

          New          192

        Commit           192

         Abort          1



******** Transactions Per Second *********

       Txn Type        Count

==========================================

          New          175

        Commit           172

         Abort          0



DELTA: select now(),sum(n_tup_ins) as n_tup_ins,sum(n_tup_upd) as n_tup_upd,sum(n_tup_del) as n_tup_del from
pg_stat_user_tables;
Postgresql
Arquitecture
Osol Pgsql
Another things
  and Q&A
Gracias!!

Weitere ähnliche Inhalte

Was ist angesagt?

Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Giovanni Bechis
 
Fast HTTP string processing algorithms
Fast HTTP string processing algorithmsFast HTTP string processing algorithms
Fast HTTP string processing algorithmsAlexander Krizhanovsky
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20DefconRussia
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03Mathias Herberts
 
Ravada VDI Eslibre
Ravada VDI EslibreRavada VDI Eslibre
Ravada VDI Eslibrefrankiejol
 
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложенийПрактический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложенийOlga Lavrentieva
 
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisApplication of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisPositive Hack Days
 
Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit44CON
 
This is not your father's monitoring.
This is not your father's monitoring.This is not your father's monitoring.
This is not your father's monitoring.Mathias Herberts
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4Benux Wei
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Mathias Herberts
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsMathias Herberts
 
Radare2 @ ndh2k15 : First r2babies steps
Radare2 @ ndh2k15 : First r2babies stepsRadare2 @ ndh2k15 : First r2babies steps
Radare2 @ ndh2k15 : First r2babies stepsMaijin
 
ch6-pv2-device-drivers
ch6-pv2-device-driversch6-pv2-device-drivers
ch6-pv2-device-driversyushiang fu
 

Was ist angesagt? (20)

Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)
 
Debugging TV Frame 0x09
Debugging TV Frame 0x09Debugging TV Frame 0x09
Debugging TV Frame 0x09
 
Node day 2014
Node day 2014Node day 2014
Node day 2014
 
Fast HTTP string processing algorithms
Fast HTTP string processing algorithmsFast HTTP string processing algorithms
Fast HTTP string processing algorithms
 
...Lag
...Lag...Lag
...Lag
 
Yg byev2e
Yg byev2eYg byev2e
Yg byev2e
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03
Warp 10 Platform Presentation - Criteo Beer & Tech 2016-02-03
 
Ravada VDI Eslibre
Ravada VDI EslibreRavada VDI Eslibre
Ravada VDI Eslibre
 
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложенийПрактический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
 
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisApplication of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
 
Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit
 
Node js lecture
Node js lectureNode js lecture
Node js lecture
 
This is not your father's monitoring.
This is not your father's monitoring.This is not your father's monitoring.
This is not your father's monitoring.
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy Systems
 
Radare2 @ ndh2k15 : First r2babies steps
Radare2 @ ndh2k15 : First r2babies stepsRadare2 @ ndh2k15 : First r2babies steps
Radare2 @ ndh2k15 : First r2babies steps
 
ch6-pv2-device-drivers
ch6-pv2-device-driversch6-pv2-device-drivers
ch6-pv2-device-drivers
 

Andere mochten auch

Monitoreo de MySQL y PostgreSQL con SQL
Monitoreo de MySQL y PostgreSQL con SQLMonitoreo de MySQL y PostgreSQL con SQL
Monitoreo de MySQL y PostgreSQL con SQLEmanuel Calvo
 
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAY
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAYPostgreSQL FTS Solutions FOSDEM 2013 - PGDAY
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAYEmanuel Calvo
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on awsEmanuel Calvo
 
LSWC PostgreSQL 9.1 (2011)
LSWC PostgreSQL 9.1 (2011)LSWC PostgreSQL 9.1 (2011)
LSWC PostgreSQL 9.1 (2011)Emanuel Calvo
 
PostgreSQL and Sphinx pgcon 2013
PostgreSQL and Sphinx   pgcon 2013PostgreSQL and Sphinx   pgcon 2013
PostgreSQL and Sphinx pgcon 2013Emanuel Calvo
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Andere mochten auch (9)

Pgbr 2013 fts
Pgbr 2013 ftsPgbr 2013 fts
Pgbr 2013 fts
 
Monitoreo de MySQL y PostgreSQL con SQL
Monitoreo de MySQL y PostgreSQL con SQLMonitoreo de MySQL y PostgreSQL con SQL
Monitoreo de MySQL y PostgreSQL con SQL
 
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAY
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAYPostgreSQL FTS Solutions FOSDEM 2013 - PGDAY
PostgreSQL FTS Solutions FOSDEM 2013 - PGDAY
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
Admon PG 1
Admon PG 1Admon PG 1
Admon PG 1
 
LSWC PostgreSQL 9.1 (2011)
LSWC PostgreSQL 9.1 (2011)LSWC PostgreSQL 9.1 (2011)
LSWC PostgreSQL 9.1 (2011)
 
PostgreSQL and Sphinx pgcon 2013
PostgreSQL and Sphinx   pgcon 2013PostgreSQL and Sphinx   pgcon 2013
PostgreSQL and Sphinx pgcon 2013
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Ähnlich wie Osol Pgsql

CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak   CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak PROIDEA
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
Openstack 101
Openstack 101Openstack 101
Openstack 101POSSCON
 
Dynamic Tracing of your AMP web site
Dynamic Tracing of your AMP web siteDynamic Tracing of your AMP web site
Dynamic Tracing of your AMP web siteSriram Natarajan
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesOdoo
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰KAI CHU CHUNG
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newYiwei Ma
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016StackIQ
 
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance ProblemsD Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance ProblemsMySQLConference
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the CloudWesley Beary
 
Scaling IO-bound microservices
Scaling IO-bound microservicesScaling IO-bound microservices
Scaling IO-bound microservicesSalo Shp
 

Ähnlich wie Osol Pgsql (20)

CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak   CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Dynamic Tracing of your AMP web site
Dynamic Tracing of your AMP web siteDynamic Tracing of your AMP web site
Dynamic Tracing of your AMP web site
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
Pycon - Python for ethical hackers
Pycon - Python for ethical hackers Pycon - Python for ethical hackers
Pycon - Python for ethical hackers
 
Explain this!
Explain this!Explain this!
Explain this!
 
Deathstar
DeathstarDeathstar
Deathstar
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance ProblemsD Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
Scaling IO-bound microservices
Scaling IO-bound microservicesScaling IO-bound microservices
Scaling IO-bound microservices
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
 
Ping to Pong
Ping to PongPing to Pong
Ping to Pong
 

Kürzlich hochgeladen

Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 

Kürzlich hochgeladen (20)

Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 

Osol Pgsql

  • 1. ¿Open Solaris y Postgresql? Por lo menos, tenés que escucharlos... Emanuel Calvo Franco @ AOSUG
  • 2. “Postgresql y Solaris conforman una plataforma de bajo costo para escenarios críticos de mediana a gran escala.”
  • 3. ¿ Que es Postgresql ? Base de Datos Objeto Relacional. Arquitectura Cliente -Servidor. Estable, capaz de correr con escasos recursos, segura y extensible.
  • 4. Características de Postgresql MVCC. PITR ACID compliant. Mejorada para Solaris. Standard SQL:2003 Funciones criptográficas avanzadas. Diversos lenguajes procedurales.
  • 5. Solaris + Pgsql Soporte Dtrace. Escalabilidad para multinucleos y procesadores. Solaris Cluster support and the PostgreSQL HA Agent Solaris Service Manager integration.
  • 9. Derby Mysql Postgresql Postgresql Other Oracle Greenplum 0 2 4 6 8 10 12 14 16
  • 11. Más beneficios con Solaris • Sun Cluster support > Sun Cluster agent available > Fully supported • ZFS + Zones for Hot Standby > ZFS cloning & replication lets you “clone” your database > Zones allows you to “clone” your DB server > OmniTI is using this technique to support a 6TB data warehouse on PostgreSQL
  • 12. Zonas ... + seguridad • Zones are Perfect for “hosted” PostgreSQL > allows 100% isolation of PostgreSQL instances per customer/application > set CPU & RAM limits for each Zone (in SXDE) > PostgreSQL can't do this natively > no per-user limits, no ability to hide the system tables > Being used by Joyent.com to host 100's of customers.
  • 14. Instalar (usando Sun Studio - Homo Simplus Compilatus ® ) # ./configure --prefix=/usr/local/pg824 CC=/opt/SUNWspro/bin/cc CFLAGS=quot;- xO3 -xarch=native -xspace -W0,-Lt -W2,-Rcond_elim -Xa -xildoff -xc99=none -xCCquot; –without-readline –with-perl –with-python –enable-dtrace # gmake # gmake install # useradd postgres # groupadd postgres # useradd -c 'PostgreSQL user' -d /export/home/postgres -g postgres -m -s /bin/ bash postgres postgres$ $PG_BIN/initdb -D /data -U postgres
  • 15. Instalar II emanuel@opensolaris_test:~$ pfexec su - postgres Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008 -bash-3.2$ ls bin data84 include lib share -bash-3.2$ bin/post postgres postmaster -bash-3.2$ bin/pg_ctl -D data84/ start server starting -bash-3.2$ LOG: database system was shut down at 2009-05-18 18:18:51 ART LOG: autovacuum launcher started LOG: database system is ready to accept connections
  • 16. Instalar (usando Sun Studio - Homo Paquetus ® ) # pkg install SUNWpostgr83server && pkg install SUNWpostgr83client (ultimo en el repo SUNWpostgr-83-server@8.3.4-0.101) - Levantar el servicio: # svcadm enable svc:/application/database/postgresql_83:default_32bit # /usr/sbin/svcadm enable postgresql:version_82
  • 17. Zonas
  • 18. Ejemplo simple de una zona global# zonecfg -z pg_zone ######instalo zonecfg:pg_zone> create global# zoneadm -z pg_zone install zonecfg:pg_zone> set zonepath=/export/zones/pg_zone ########listo zonecfg:pg_zone> set autoboot=true global# zoneadm list -iv zonecfg:pg_zone> add net ########booteo zonecfg:pg_zone:net> set address=10.6.222.74/24 global# zoneadm -z pg_zone boot zonecfg:pg_zone:net> set physical=ipge0 #######logueo zonecfg:pg_zone:net> end global# zlogin -C pg_zone zonecfg:pg_zone> verify zonecfg:pg_zone> commit zonecfg:pg_zone> exit
  • 19. ZFS
  • 20. Very simple tricks # zfs create -b 8192 rpool/data # zfs list # zfs set mountpoint=data84 rpool/data84 # zfs set mountpoint=$PWD/data84 rpool/data84 # zfs set compression=on rpool/data84 # zfs list # zfs set quota=1g rpool/data84 # zfs set reservation=100m rpool/data84 # zfs set sharenfs=rw rpool/data84 # zpool list # zfs list
  • 22. Script D #!/usr/sbin/dtrace -s syscall:::entry /execname== quot;postgresquot;/ { self->ts=timestamp; } syscall:::return /execname== quot;postgresquot; && self->ts/ { @a[quot;Countquot;,probefunc] = count(); @b[quot;Timequot;,probefunc] = sum (timestamp - self->ts); self->ts=0; } tick-10sec { exit(0); }
  • 23. Ejemplo root@opensolaris_test:/usr/local/postgres_home_84# ./syscall.d dtrace: script './syscall.d' matched 471 probes CPU ID FUNCTION:NAME 0 55976 :tick-10sec Count gtime 47 Count pollsys 105 Count getpid 109 Time gtime 8438387 Time getpid 29391576 Time pollsys 36537963468
  • 24. Medición de Transacciones #!/usr/sbin/dtrace -qs profile:::tick-1s postgresql*:::transaction-start { { printf(quot;******** Transactions Per Second *********nquot;); @startpersec[quot;Newquot;] = count(); printf(quot;%20s %15snquot;, quot;Txn Typequot;, quot;Countquot;); } printf(quot;============================ postgresql*:::transaction-commit ==============nquot;); { printa(quot;%20s %@15dnquot;, @startpersec); @commitpersec[ quot;Commitquot;] = count(); printa(quot;%20s %@15dnquot;, @commitpersec); } printa(quot;%20s %@15dnquot;, @abort); postgresql*:::transaction-abort printf(quot;nquot;); { clear(@startpersec); @abort[quot;Abortquot;] = count(); clear(@commitpersec); } clear(@abort); }
  • 25. Salida ******** Transactions Per Second ********* Txn Type Count ========================================== New 192 Commit 192 Abort 1 ******** Transactions Per Second ********* Txn Type Count ========================================== New 175 Commit 172 Abort 0 DELTA: select now(),sum(n_tup_ins) as n_tup_ins,sum(n_tup_upd) as n_tup_upd,sum(n_tup_del) as n_tup_del from pg_stat_user_tables;
  • 28. Another things and Q&A