SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcachedSkills Matter
 
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 CodingMapR Technologies
 
Azure Recovery Services
Azure Recovery ServicesAzure Recovery Services
Azure Recovery ServicesPavel Revenkov
 
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]Joshua Harlow
 
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 AzureRevolution Analytics
 
Sofia WP User Group Presentation
Sofia WP User Group PresentationSofia WP User Group Presentation
Sofia WP User Group PresentationDaniel Kanchev
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance DrupalChapter Three
 
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 AWSAmazon Web Services
 
Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2Day of Cloud: Amazon EC2
Day of Cloud: Amazon EC2cmcavoy
 
Running JVM in Docker
Running JVM in DockerRunning JVM in Docker
Running JVM in DockerUri Savelchev
 
Implementing High Performance Drupal Sites
Implementing High Performance Drupal SitesImplementing High Performance Drupal Sites
Implementing High Performance Drupal SitesShri Kumar
 
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 DAMSalxbrdg
 
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)jimyhuang
 
Migratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadMigratory Workloads Across Clouds with Nomad
Migratory Workloads Across Clouds with NomadPhilip Watts
 
Environment for training models
Environment for training modelsEnvironment for training models
Environment for training modelsFlyElephant
 
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 ArchitectKamal A
 
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 MachinesAmit Banerjee
 
CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps2005
 

Mais procurados (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
 

Destaque

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
 
E-Tohum Girisimcilik Sunumu
E-Tohum Girisimcilik SunumuE-Tohum Girisimcilik Sunumu
E-Tohum Girisimcilik Sunumuesokullu
 
Violence Stops Here2011 Tearsheet
Violence Stops Here2011 TearsheetViolence Stops Here2011 Tearsheet
Violence Stops Here2011 TearsheetJaqpott
 
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 SanJaqpott
 
Project Proteus Proteus Overview Q404
Project Proteus Proteus Overview Q404Project Proteus Proteus Overview Q404
Project Proteus Proteus Overview Q404Jaqpott
 
Value Stream Mapping
Value Stream MappingValue Stream Mapping
Value Stream MappingUbersoldat
 
Project management in a visual way
Project management in a visual wayProject management in a visual way
Project management in a visual waySophie Uesson
 
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.PSesokullu
 
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 odtuesokullu
 
Quality Circle
Quality CircleQuality Circle
Quality CircleUbersoldat
 
The Basics of Creating a Metric
The Basics of Creating a MetricThe Basics of Creating a Metric
The Basics of Creating a MetricUbersoldat
 
Waste Overview and Benefits
Waste Overview and BenefitsWaste Overview and Benefits
Waste Overview and BenefitsUbersoldat
 
Reunion 1º trrm 13 14
Reunion 1º trrm 13 14Reunion 1º trrm 13 14
Reunion 1º trrm 13 14jcromgar
 
Root Cause Corrective Action
Root Cause Corrective ActionRoot Cause Corrective Action
Root Cause Corrective ActionUbersoldat
 
Leading High Performance Teams
Leading High Performance TeamsLeading High Performance Teams
Leading High Performance TeamsUbersoldat
 
Conducting Effective Meetings
Conducting Effective MeetingsConducting Effective Meetings
Conducting Effective MeetingsUbersoldat
 

Destaque (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
 

Semelhante a Scalability at GROU.PS

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 scalabilityWim Godden
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Combell NV
 
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 CloudRevolution Analytics
 
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 RubyRobert Dempsey
 
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 PatternsLaine Campbell
 
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 minutesVladimir Simek
 
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 InternetAchieve 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 InternetAchieve 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 MapReduceAmazon Web Services
 
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 confoo2012Combell NV
 
Cloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the CloudCloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the Cloudpetriojala123
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceAshok Modi
 
IBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark BasicsIBM Spark Meetup - RDD & Spark Basics
IBM Spark Meetup - RDD & Spark BasicsSatya Narayan
 
(DAT407) Amazon ElastiCache: Deep Dive
(DAT407) Amazon ElastiCache: Deep Dive(DAT407) Amazon ElastiCache: Deep Dive
(DAT407) Amazon ElastiCache: Deep DiveAmazon Web Services
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisationgrooverdan
 
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)Kaliop-slide
 
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=151xlight
 
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 azureMicrosoft Tech Community
 
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 scalabilityWim Godden
 

Semelhante 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

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Último (20)

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

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