SlideShare una empresa de Scribd logo
1 de 27
Scalability at GROU.PS EmreSokullu
Disclaimer We’re not fully there yet We hire: jobs@groups-inc.com
Challenges @ GROU.PS 3M unique visitors per month 120M page views 1PB assets to be served every month Video,Photos, Files Support for 5Gbit/s Very dynamic pages: With social networks; p(u,t) = HTML p(g,u,t) = HTML -> WHERE group_id = ? AND …
What is GROU.PS ?
Distributed Architecture 25+ servers, S3 cloud, EdgeCast CDN 4 cores +  All Linux: Red Hat Some Debian, Ubuntu, CentOS
Amazon Technologies S3 CloudFront EC2 (elastic IP and persistent storage) SimpleDB Queue technologies, distributed hadoop and more…
Amazon Technologies Downside:  Not so cheap Bad database performance
Serving Content? Use MogileFS Distributed file serving Use CDN hot content served off from local servers Sysctl tunings needed!
Our typical sysctl additions net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_synack_retries = 2 ## Emre edited # http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnFedora8.php kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=4194304 #net.core.rmem_max=4194304 net.core.wmem_default=262144 #net.core.wmem_max=262144 fs.file-max=5049800 vm.swappiness=10 ## Emre edited # from http://forums.softlayer.com/showthread.php?t=3252 net.ipv4.tcp_rmem = 4096 87380 8388608 net.ipv4.tcp_wmem = 4096 87380 8388608 net.core.rmem_max = 8388608 net.core.wmem_max = 8388608 net.core.netdev_max_backlog = 5000 net.ipv4.tcp_window_scaling = 1 net.ipv4.ip_nonlocal_bind=1 # http://rackerhacker.com/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/ kernel.msgmni = 1024 kernel.sem = 250 256000 32 1024 net.ipv4.ip_conntrack_max = 524288 net.ipv4.netfilter.ip_conntrack_max = 524288
MySQL Load off via memcache $memcache->set(“group_by_name.jtpd”, 1122, false, 0); $memcache->set(“home_module_html.1122”,…, true, 30); function getGroupID($group_name) {  global $memcache;  if( !isset($memcache) || ($res=($memcache->get(“group_by_name.{$group_name}”)))===false ) {    // get it from mysql and memcache  }  else {    return $res; // serve from memcache  }}
MySQL Replication easy Split Reads What about writes? That’s where sharding comes to play Vertical Sharding Horizontal Sharding MMM
MySQL Runs poorly on multi-cores query_cache_size = 0 # on master query_cache_type = 0 # on master thread_concurrency = 8 # total cores max_connections = 750 # shouldn’t exceed that innodb_buffer_pool_size = 10G  # a little less than the total amount
MySQL Query Optimization INDEX  group, user WHERE group = ? AND user = ? Not WHERE user = ? AND group = ? B-tree
MySQL Query Optimization SHOW PROCESSLIST Maatkit, mk-query-digest Percona builds
NOSQL Voldemort, Linkedin Cassandra, Facebook Tokyo Cabinet, mixi
Logging Database logging is not the solution File system is expensive too A legal necessity
Logging Solution: Scribe & Thrift By Facebook Eventually consistent
Nginx & libevent
Nginx & libevent Handles 10000 connections 5gbit/s Rambler Wordpress Grou.ps
Postfix Run multiple instances Spam Clusters
Monitoring Munin + monit Other alternatives: Cacti Nagios Hyperic – vmware
PHP
More to come on my blog http://emresokullu.com More fine tuning tips Become a member of my community Love grou.ps ;) Convert to PHP We’re hiring: jobs@groups-inc.com

Más contenido relacionado

La actualidad más candente

Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
Skills Matter
 

La actualidad más candente (20)

Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
 
Kenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No CodingKenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No Coding
 
Azure Recovery Services
Azure Recovery ServicesAzure Recovery Services
Azure Recovery Services
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to Azure
 
Sofia WP User Group Presentation
Sofia WP User Group PresentationSofia WP User Group Presentation
Sofia WP User Group Presentation
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Breaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWSBreaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWS
 
Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2
 
Running JVM in Docker
Running JVM in DockerRunning JVM in Docker
Running JVM in Docker
 
Implementing High Performance Drupal Sites
Implementing High Performance Drupal SitesImplementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
 
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
Rich storytelling with Drupal, Paragraphs and Islandora DAMSRich storytelling with Drupal, Paragraphs and Islandora DAMS
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
 
Scaling in Mind (Case study of Drupal Core)
Scaling in Mind (Case study of Drupal Core)Scaling in Mind (Case study of Drupal Core)
Scaling in Mind (Case study of Drupal Core)
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Migratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadMigratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with Nomad
 
Environment for training models
Environment for training modelsEnvironment for training models
Environment for training models
 
Practical Hadoop Big Data Training Course by Certified Architect
Practical Hadoop Big Data Training Course by Certified ArchitectPractical Hadoop Big Data Training Course by Certified Architect
Practical Hadoop Big Data Training Course by Certified Architect
 
Performance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual MachinesPerformance Demystified for SQL Server on Azure Virtual Machines
Performance Demystified for SQL Server on Azure Virtual Machines
 
Optimize drupal
Optimize drupalOptimize drupal
Optimize drupal
 
CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015
 

Destacado

Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
Jaqpott
 
Violence Stops Here2011 Tearsheet
Violence Stops Here2011 TearsheetViolence Stops Here2011 Tearsheet
Violence Stops Here2011 Tearsheet
Jaqpott
 
Reunion 1º trrm 13 14
Reunion 1º trrm 13 14Reunion 1º trrm 13 14
Reunion 1º trrm 13 14
jcromgar
 

Destacado (17)

Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
 
E-Tohum Girisimcilik Sunumu
E-Tohum Girisimcilik SunumuE-Tohum Girisimcilik Sunumu
E-Tohum Girisimcilik Sunumu
 
Violence Stops Here2011 Tearsheet
Violence Stops Here2011 TearsheetViolence Stops Here2011 Tearsheet
Violence Stops Here2011 Tearsheet
 
2011 Violence Stops Here Campaign Details Finalanalysis San
2011 Violence Stops Here Campaign Details Finalanalysis San2011 Violence Stops Here Campaign Details Finalanalysis San
2011 Violence Stops Here Campaign Details Finalanalysis San
 
Project Proteus Proteus Overview Q404
Project Proteus Proteus Overview Q404Project Proteus Proteus Overview Q404
Project Proteus Proteus Overview Q404
 
Value Stream Mapping
Value Stream MappingValue Stream Mapping
Value Stream Mapping
 
Project management in a visual way
Project management in a visual wayProject management in a visual way
Project management in a visual way
 
Facebook Connect & Facebook Platform In Use At GROU.PS
Facebook Connect & Facebook Platform In Use At GROU.PSFacebook Connect & Facebook Platform In Use At GROU.PS
Facebook Connect & Facebook Platform In Use At GROU.PS
 
Five Whys
Five WhysFive Whys
Five Whys
 
Silikon vadisi'nde turk olmak 2014 odtu
Silikon vadisi'nde turk olmak 2014 odtuSilikon vadisi'nde turk olmak 2014 odtu
Silikon vadisi'nde turk olmak 2014 odtu
 
Quality Circle
Quality CircleQuality Circle
Quality Circle
 
The Basics of Creating a Metric
The Basics of Creating a MetricThe Basics of Creating a Metric
The Basics of Creating a Metric
 
Waste Overview and Benefits
Waste Overview and BenefitsWaste Overview and Benefits
Waste Overview and Benefits
 
Reunion 1º trrm 13 14
Reunion 1º trrm 13 14Reunion 1º trrm 13 14
Reunion 1º trrm 13 14
 
Root Cause Corrective Action
Root Cause Corrective ActionRoot Cause Corrective Action
Root Cause Corrective Action
 
Leading High Performance Teams
Leading High Performance TeamsLeading High Performance Teams
Leading High Performance Teams
 
Conducting Effective Meetings
Conducting Effective MeetingsConducting Effective Meetings
Conducting Effective Meetings
 

Similar a Scalability at GROU.PS

http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151
xlight
 

Similar a Scalability at GROU.PS (20)

Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012
 
Speed up R with parallel programming in the Cloud
Speed up R with parallel programming in the CloudSpeed up R with parallel programming in the Cloud
Speed up R with parallel programming in the Cloud
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with Ruby
 
The Web Scale
The Web ScaleThe Web Scale
The Web Scale
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and Patterns
 
How to run your Hadoop Cluster in 10 minutes
How to run your Hadoop Cluster in 10 minutesHow to run your Hadoop Cluster in 10 minutes
How to run your Hadoop Cluster in 10 minutes
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
 
Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012
 
Cloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the CloudCloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the Cloud
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
IBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark BasicsIBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark Basics
 
(DAT407) Amazon ElastiCache: Deep Dive
(DAT407) Amazon ElastiCache: Deep Dive(DAT407) Amazon ElastiCache: Deep Dive
(DAT407) Amazon ElastiCache: Deep Dive
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)
 
http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151http://www.hfadeel.com/Blog/?p=151
http://www.hfadeel.com/Blog/?p=151
 
Migrating existing open source machine learning to azure
Migrating existing open source machine learning to azureMigrating existing open source machine learning to azure
Migrating existing open source machine learning to azure
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Scalability at GROU.PS

  • 2. Disclaimer We’re not fully there yet We hire: jobs@groups-inc.com
  • 3. Challenges @ GROU.PS 3M unique visitors per month 120M page views 1PB assets to be served every month Video,Photos, Files Support for 5Gbit/s Very dynamic pages: With social networks; p(u,t) = HTML p(g,u,t) = HTML -> WHERE group_id = ? AND …
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Distributed Architecture 25+ servers, S3 cloud, EdgeCast CDN 4 cores + All Linux: Red Hat Some Debian, Ubuntu, CentOS
  • 10. Amazon Technologies S3 CloudFront EC2 (elastic IP and persistent storage) SimpleDB Queue technologies, distributed hadoop and more…
  • 11. Amazon Technologies Downside: Not so cheap Bad database performance
  • 12. Serving Content? Use MogileFS Distributed file serving Use CDN hot content served off from local servers Sysctl tunings needed!
  • 13. Our typical sysctl additions net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_synack_retries = 2 ## Emre edited # http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnFedora8.php kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=4194304 #net.core.rmem_max=4194304 net.core.wmem_default=262144 #net.core.wmem_max=262144 fs.file-max=5049800 vm.swappiness=10 ## Emre edited # from http://forums.softlayer.com/showthread.php?t=3252 net.ipv4.tcp_rmem = 4096 87380 8388608 net.ipv4.tcp_wmem = 4096 87380 8388608 net.core.rmem_max = 8388608 net.core.wmem_max = 8388608 net.core.netdev_max_backlog = 5000 net.ipv4.tcp_window_scaling = 1 net.ipv4.ip_nonlocal_bind=1 # http://rackerhacker.com/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/ kernel.msgmni = 1024 kernel.sem = 250 256000 32 1024 net.ipv4.ip_conntrack_max = 524288 net.ipv4.netfilter.ip_conntrack_max = 524288
  • 14. MySQL Load off via memcache $memcache->set(“group_by_name.jtpd”, 1122, false, 0); $memcache->set(“home_module_html.1122”,…, true, 30); function getGroupID($group_name) { global $memcache; if( !isset($memcache) || ($res=($memcache->get(“group_by_name.{$group_name}”)))===false ) { // get it from mysql and memcache } else { return $res; // serve from memcache }}
  • 15. MySQL Replication easy Split Reads What about writes? That’s where sharding comes to play Vertical Sharding Horizontal Sharding MMM
  • 16. MySQL Runs poorly on multi-cores query_cache_size = 0 # on master query_cache_type = 0 # on master thread_concurrency = 8 # total cores max_connections = 750 # shouldn’t exceed that innodb_buffer_pool_size = 10G # a little less than the total amount
  • 17. MySQL Query Optimization INDEX group, user WHERE group = ? AND user = ? Not WHERE user = ? AND group = ? B-tree
  • 18. MySQL Query Optimization SHOW PROCESSLIST Maatkit, mk-query-digest Percona builds
  • 19. NOSQL Voldemort, Linkedin Cassandra, Facebook Tokyo Cabinet, mixi
  • 20. Logging Database logging is not the solution File system is expensive too A legal necessity
  • 21. Logging Solution: Scribe & Thrift By Facebook Eventually consistent
  • 23. Nginx & libevent Handles 10000 connections 5gbit/s Rambler Wordpress Grou.ps
  • 24. Postfix Run multiple instances Spam Clusters
  • 25. Monitoring Munin + monit Other alternatives: Cacti Nagios Hyperic – vmware
  • 26. PHP
  • 27. More to come on my blog http://emresokullu.com More fine tuning tips Become a member of my community Love grou.ps ;) Convert to PHP We’re hiring: jobs@groups-inc.com