SlideShare a Scribd company logo
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetcloud Training Program
ChinaNetCloud Training
Linux Memory Basics
By ChinaNetCloud
Pioneers in OaaS – Operations-as-a-Service
October, 2013
www.ChinaNetCloud.com
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 2
Introduction
●
Linux memory is complex and interesting
●
Class summarizes:
●
Types of memory
●
How it's used
●
How to troubleshoot memory issues
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 3
Overview, Purpose & Use
●
Linux memory is one of the most important
areas for engineers to understand
●
Used by everything
●
Often not well-understood
●
Often the cause of problems
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 4
Introduction
●
Memory is simple, in theory
●
Complex in real use
●
Plenty of strange things, too
●
Important to understand
●
Important to monitor
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 5
Memory Types I
●
Physical RAM – Fixed amount, real RAM
●
Virtual Memory – Virtual, can swap
●
Shared – Between processes
●
Oracle & Postgres use this
●
Slab – Kernel memory
●
/proc/slabinfo & slabtop utility
●
Includes big RAM users
– tcpmem & inode cache
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 6
Memory Types II
●
Page Cache – File system cache
●
Dirty
●
Changed file system data waiting to write to disks
●
Important for high write systems
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 7
/proc/meminfo
Very useful but complex
●
These are items not found by 'free' or 'top'
●
MemTotal: Total usable ram (RAM minus kernel binary code)
●
MemFree: Total free memory, same as free's 'free' output
●
SwapCached: Memory swapped out, then back in, but still
also in the swapfile
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 8
/proc/meminfo
●
Active – Recently used, not reclaimed unless necessary
●
Inactive – Less recently used, likely to be reclaimed
●
Dirty – File / Page Cache waiting to be written to disk
●
Writeback – Memory which is now being written to the disk
●
Mapped – Memory Mapped files, such as libraries
●
Includes Mongo, Varnish, and many others
●
Slab – Kernel memory, usually 256-512MB
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 9
Memory Page Size
●
4KB page size
●
Important as many stats are in pages
– Be careful of units ! KB vs. Pages
●
sysctl items like tcpmem are mixed
●
Do not confuse with disk sector size of 0.5KB
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 10
Free -m
●
Total – Physical in machine
●
Used – by Apps plus Cache, Buffers and maybe Shared
●
Free – Totally unused RAM, not important, usually very small
●
Shared – by different processes like Oracle / Postgres
●
Buffers – Raw block cache to/from disks, not impotrant
●
Cached (Page Cache) – Used by disk files cached in RAM
●
Swap – Total, Used, Free – Used should be small
●
-/+ buffers/cache – Important numbers, inside box is key
●
PAY ATTENTION to the BOX number – it's all that matters
total used free shared buffers cached
Mem: 3961 3901 60 0 121 1232
-/+ buffers/cache: 2546 1414
Swap: 4683 756 3927
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 11
Top, ps Memory Output
●
VIRT – Virtual size
●
Includes mapped libraries, often very large
●
Not too useful – IGNORE THIS
●
RSS – Resident Set Size
●
Most important !
●
Real RAM used by applications, not including swap
●
SHR – Shared, such as Oracle / Postgres
●
Be careful to see processes not threads
●
Threads will share RSS, see htop in thread mode
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 12
Swap
●
Simple, but not simple
●
Managed by kswapd
●
Actual swap used calc
●
SwapTotal – SwapCached – SwapFree
●
Goal is zero swap on servers
●
Never let a system actively swap
●
But some systems will have small swap
●
Common to see 100-200MB, more on big system
●
NUMA defaults can cause swapping
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 13
Problem with Swap
●
Swapping FREEZES the swapping process
●
So, a 32MB byte swap of MySQL RAM
●
Freezes ALL of MySQL for many seconds
●
Very bad for applications
●
Bad for any single process system
●
MySQL, Nginx, HAProxy, etc. (not Apache)
●
Also uses valuable IO, slowing DBs, etc.
●
Goal is to NEVER swap real applications
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 14
Swappiness
●
Tells kernel which is more important
●
File system Cache vs. App Memory
●
Default is 60 – Means cache more important
●
Stupid for servers – will swap even with free RAM
●
Set to 1, always (used to be 0, now use 1)
●
Won't swap until all RAM used by applications
●
Note some swap anyway (see next slide)
●
Set by sysctl
●
Check in /proc/sys/vm/swappiness
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 15
Swap still happens
●
Linux likes to swap a little
●
Even with free RAM and swappiness = 0
●
Some kernel data wants to swap
●
Can pre-swap SwapCached data
●
Still a mystery, but it's okay
●
Very large systems (64GB+ might swap 1-2GB)
●
Turning off can cause kswapd to go crazy
●
Watch vmstat swapin/out, make sure very small
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 16
NUMA - Can cause swap
●
NUMA – Non-Uniform Memory Access
●
Each CPU has its own RAM
●
Slower to use 'other' CPU's RAM
●
Standard now on all Intel servers
●
Causes RAM inbalance on big RAM processes
●
Like MySQL, MongoDB, Java
●
Install & use numa-utils package, numactl app
●
Set all big processes to full interleave:
●
numactrl –interleave all mysqld . . .
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 17
Dirty Memory & Ratios
●
Causes strange problems & performance issues
●
See /proc/meminfo
●
Dirty is the changed FileSystem cache data
●
Must be written to disk
●
Can cause big problems if too high
●
Two ratios control
●
/proc/sys/vm/dirty_background_ratio / _bytes
●
/proc/sys/vm/dirty_ratio / _bytes
●
Freezes all writing processes when dirty > dirty_ratio
●
Calculation not clear, but keep dirty data < 20% of RAM
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 18
OOM Killer
●
Kills process when no more RAM or Swap
●
Chooses process to die via a score
●
Biggest RAM user (MySQL) often dies first
●
See /proc/<pid>/oom_score
●
Always a message in dmesg - /var/log/kernel
●
Can adjust score to control (advanced)
●
Best practice to monitor swap and log
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2013 ChinaNetCloud 19
Summary
●
Memory important to understand
●
Especially basics & definitions
●
Understand swap & swappiness
●
Watch NUMA on big systems
●
Memory is cheap – buy more !
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
Copyright 2015 ChinaNetCloud 20
About ChinaNetCloud
ChinaNetCloudRunning the World's Internet Servers 管理全球服务器
ChinaNetCloud
Sales@ChinaNetCloud.com
www.ChinaNetCloud.com
Beijing Office:
Lee World Business Building #305
57 Happiness Village Road,
Chaoyang District
Beijing, 100027 China
Silicon Valley Office:
California Avenue
Palo Alto, 94123 USA
Shanghai Headquarters:
X2 Space 1-601, 1238 Xietu Lu
Shanghai, 200032 China
T: +86-21-6422-1946 F: +86-21-
6422-4911

More Related Content

What's hot

Recent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource managementRecent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource management
OpenVZ
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
FromDual GmbH
 
Webinar: Keeping Your MongoDB Data Safe
Webinar: Keeping Your MongoDB Data SafeWebinar: Keeping Your MongoDB Data Safe
Webinar: Keeping Your MongoDB Data Safe
MongoDB
 
Redis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button gamesRedis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button games
Redis Labs
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
Gluster.org
 
DB Latency Using DRAM + PMem in App Direct & Memory Modes
DB Latency Using DRAM + PMem in App Direct & Memory ModesDB Latency Using DRAM + PMem in App Direct & Memory Modes
DB Latency Using DRAM + PMem in App Direct & Memory Modes
ScyllaDB
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
Redis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HARedis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HA
Dave Nielsen
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelona
Gluster.org
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
Ceph Community
 
MySQL topology healing at OLA.
MySQL topology healing at OLA.MySQL topology healing at OLA.
MySQL topology healing at OLA.
Mydbops
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
NETWAYS
 
Scalr: Setting Up Automated Scaling
Scalr: Setting Up Automated ScalingScalr: Setting Up Automated Scaling
Scalr: Setting Up Automated Scaling
Hakka Labs
 
Caffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noelCaffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noel
Sri Ambati
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPChau Thanh
 
Zing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectZing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat Architect
Chau Thanh
 
Avoiding Data Hotspots at Scale
Avoiding Data Hotspots at ScaleAvoiding Data Hotspots at Scale
Avoiding Data Hotspots at Scale
ScyllaDB
 
Shared Database Concurrency
Shared Database ConcurrencyShared Database Concurrency
Shared Database Concurrency
Aivars Kalvans
 

What's hot (20)

Recent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource managementRecent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource management
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
 
Webinar: Keeping Your MongoDB Data Safe
Webinar: Keeping Your MongoDB Data SafeWebinar: Keeping Your MongoDB Data Safe
Webinar: Keeping Your MongoDB Data Safe
 
Redis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button gamesRedis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button games
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
 
DB Latency Using DRAM + PMem in App Direct & Memory Modes
DB Latency Using DRAM + PMem in App Direct & Memory ModesDB Latency Using DRAM + PMem in App Direct & Memory Modes
DB Latency Using DRAM + PMem in App Direct & Memory Modes
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Redis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HARedis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HA
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelona
 
Memcache d
Memcache dMemcache d
Memcache d
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
 
MySQL topology healing at OLA.
MySQL topology healing at OLA.MySQL topology healing at OLA.
MySQL topology healing at OLA.
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
 
Scalr: Setting Up Automated Scaling
Scalr: Setting Up Automated ScalingScalr: Setting Up Automated Scaling
Scalr: Setting Up Automated Scaling
 
Caffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noelCaffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noel
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
Zing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectZing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat Architect
 
Avoiding Data Hotspots at Scale
Avoiding Data Hotspots at ScaleAvoiding Data Hotspots at Scale
Avoiding Data Hotspots at Scale
 
Shared Database Concurrency
Shared Database ConcurrencyShared Database Concurrency
Shared Database Concurrency
 

Viewers also liked

Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
pradeepelinux
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Suvendu Kumar Dash
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
INSIGHT FORENSIC
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
Kamal Maiti
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
SeongJae Park
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
haish
 
Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxVarun Mahajan
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Threads
ThreadsThreads
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory ManagementNi Zo-Ma
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversAnil Kumar Pugalia
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
Anil Kumar Pugalia
 

Viewers also liked (20)

Processes
ProcessesProcesses
Processes
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
 
Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/Linux
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Threads
ThreadsThreads
Threads
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Embedded Storage Management
Embedded Storage ManagementEmbedded Storage Management
Embedded Storage Management
 
Architecture Porting
Architecture PortingArchitecture Porting
Architecture Porting
 
Embedded I/O Management
Embedded I/O ManagementEmbedded I/O Management
Embedded I/O Management
 
Embedded Applications
Embedded ApplicationsEmbedded Applications
Embedded Applications
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux Drivers
 
RPM Building
RPM BuildingRPM Building
RPM Building
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
Synchronization
SynchronizationSynchronization
Synchronization
 

Similar to Linux Memory Basics for SysAdmins - ChinaNetCloud Training

Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmudjcp
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
Federico Razzoli
 
Linux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and OpportunitiesLinux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and Opportunities
Raghavendra Prabhu
 
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
OpenNebula Project
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
NETWAYS
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
Marc Leeman
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningFromDual GmbH
 
The Dark Side Of Go -- Go runtime related problems in TiDB in production
The Dark Side Of Go -- Go runtime related problems in TiDB  in productionThe Dark Side Of Go -- Go runtime related problems in TiDB  in production
The Dark Side Of Go -- Go runtime related problems in TiDB in production
PingCAP
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
Deep Kapadia
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
OSInet
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
Maxence Dunnewind
 
GCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorGCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory Allocator
SeongJae Park
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptx
Vinicius M Grippa
 
Linux Huge Pages
Linux Huge PagesLinux Huge Pages
Linux Huge Pages
Geraldo Netto
 
Software Design for Persistent Memory Systems
Software Design for Persistent Memory SystemsSoftware Design for Persistent Memory Systems
Software Design for Persistent Memory Systems
C4Media
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs Talks
Redis Labs
 
Deploying Containers and Managing Them
Deploying Containers and Managing ThemDeploying Containers and Managing Them
Deploying Containers and Managing ThemDocker, Inc.
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
Jaime Crespo
 

Similar to Linux Memory Basics for SysAdmins - ChinaNetCloud Training (20)

Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
 
Linux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and OpportunitiesLinux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and Opportunities
 
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
OpenNebulaConf 2013 - How Can OpenNebula Fit Your Needs: A European Project F...
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL Tuning
 
The Dark Side Of Go -- Go runtime related problems in TiDB in production
The Dark Side Of Go -- Go runtime related problems in TiDB  in productionThe Dark Side Of Go -- Go runtime related problems in TiDB  in production
The Dark Side Of Go -- Go runtime related problems in TiDB in production
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
 
GCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorGCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory Allocator
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptx
 
Linux Huge Pages
Linux Huge PagesLinux Huge Pages
Linux Huge Pages
 
Software Design for Persistent Memory Systems
Software Design for Persistent Memory SystemsSoftware Design for Persistent Memory Systems
Software Design for Persistent Memory Systems
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs Talks
 
Optimizing Linux Servers
Optimizing Linux ServersOptimizing Linux Servers
Optimizing Linux Servers
 
Deploying Containers and Managing Them
Deploying Containers and Managing ThemDeploying Containers and Managing Them
Deploying Containers and Managing Them
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 

More from ChinaNetCloud

AWS ELB Tips & Best Practices
AWS ELB Tips & Best PracticesAWS ELB Tips & Best Practices
AWS ELB Tips & Best Practices
ChinaNetCloud
 
OpsStack--Integrated Operation Platform
OpsStack--Integrated Operation PlatformOpsStack--Integrated Operation Platform
OpsStack--Integrated Operation Platform
ChinaNetCloud
 
ChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud Online Lecture:Something About TsharkChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud
 
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
ChinaNetCloud
 
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
Steve Mushero on Entrepreneurship - 创业 - 崔牛会Steve Mushero on Entrepreneurship - 创业 - 崔牛会
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
ChinaNetCloud
 
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
ChinaNetCloud
 
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
ChinaNetCloud
 
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
ChinaNetCloud
 
AWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloudAWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloud
ChinaNetCloud
 
Running Internet Systems in China - The Details You Need to Succeed in Chines...
Running Internet Systems in China - The Details You Need to Succeed in Chines...Running Internet Systems in China - The Details You Need to Succeed in Chines...
Running Internet Systems in China - The Details You Need to Succeed in Chines...
ChinaNetCloud
 
Making Internet Operations Easier
Making Internet Operations EasierMaking Internet Operations Easier
Making Internet Operations Easier
ChinaNetCloud
 
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
Internet Cloud Operations - ChinaNetcloud & AWS Event BeijingInternet Cloud Operations - ChinaNetcloud & AWS Event Beijing
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
ChinaNetCloud
 
Big Data Security (ChinaNetCloud - Guiyang Conference)
Big Data Security (ChinaNetCloud - Guiyang Conference)Big Data Security (ChinaNetCloud - Guiyang Conference)
Big Data Security (ChinaNetCloud - Guiyang Conference)
ChinaNetCloud
 
Internet System Security Overview
Internet System Security OverviewInternet System Security Overview
Internet System Security Overview
ChinaNetCloud
 
Why Work at ChinaNetCloud
Why Work at ChinaNetCloudWhy Work at ChinaNetCloud
Why Work at ChinaNetCloud
ChinaNetCloud
 
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco eventCloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
ChinaNetCloud
 
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
Automatically Managing  Internet Operations  In The Cloud - 云计算平台的自动化运维Automatically Managing  Internet Operations  In The Cloud - 云计算平台的自动化运维
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
ChinaNetCloud
 
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
ChinaNetCloud - Aliyun Joint Event on Cloud Operations ChinaNetCloud - Aliyun Joint Event on Cloud Operations
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
ChinaNetCloud
 
Clouds in China
Clouds in ChinaClouds in China
Clouds in China
ChinaNetCloud
 
ChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud - Public Clouds in China OverviewChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud
 

More from ChinaNetCloud (20)

AWS ELB Tips & Best Practices
AWS ELB Tips & Best PracticesAWS ELB Tips & Best Practices
AWS ELB Tips & Best Practices
 
OpsStack--Integrated Operation Platform
OpsStack--Integrated Operation PlatformOpsStack--Integrated Operation Platform
OpsStack--Integrated Operation Platform
 
ChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud Online Lecture:Something About TsharkChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud Online Lecture:Something About Tshark
 
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
 
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
Steve Mushero on Entrepreneurship - 创业 - 崔牛会Steve Mushero on Entrepreneurship - 创业 - 崔牛会
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
 
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
 
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
 
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
 
AWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloudAWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloud
 
Running Internet Systems in China - The Details You Need to Succeed in Chines...
Running Internet Systems in China - The Details You Need to Succeed in Chines...Running Internet Systems in China - The Details You Need to Succeed in Chines...
Running Internet Systems in China - The Details You Need to Succeed in Chines...
 
Making Internet Operations Easier
Making Internet Operations EasierMaking Internet Operations Easier
Making Internet Operations Easier
 
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
Internet Cloud Operations - ChinaNetcloud & AWS Event BeijingInternet Cloud Operations - ChinaNetcloud & AWS Event Beijing
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
 
Big Data Security (ChinaNetCloud - Guiyang Conference)
Big Data Security (ChinaNetCloud - Guiyang Conference)Big Data Security (ChinaNetCloud - Guiyang Conference)
Big Data Security (ChinaNetCloud - Guiyang Conference)
 
Internet System Security Overview
Internet System Security OverviewInternet System Security Overview
Internet System Security Overview
 
Why Work at ChinaNetCloud
Why Work at ChinaNetCloudWhy Work at ChinaNetCloud
Why Work at ChinaNetCloud
 
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco eventCloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
 
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
Automatically Managing  Internet Operations  In The Cloud - 云计算平台的自动化运维Automatically Managing  Internet Operations  In The Cloud - 云计算平台的自动化运维
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
 
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
ChinaNetCloud - Aliyun Joint Event on Cloud Operations ChinaNetCloud - Aliyun Joint Event on Cloud Operations
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
 
Clouds in China
Clouds in ChinaClouds in China
Clouds in China
 
ChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud - Public Clouds in China OverviewChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud - Public Clouds in China Overview
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Linux Memory Basics for SysAdmins - ChinaNetCloud Training

  • 1. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetcloud Training Program ChinaNetCloud Training Linux Memory Basics By ChinaNetCloud Pioneers in OaaS – Operations-as-a-Service October, 2013 www.ChinaNetCloud.com
  • 2. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 2 Introduction ● Linux memory is complex and interesting ● Class summarizes: ● Types of memory ● How it's used ● How to troubleshoot memory issues
  • 3. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 3 Overview, Purpose & Use ● Linux memory is one of the most important areas for engineers to understand ● Used by everything ● Often not well-understood ● Often the cause of problems
  • 4. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 4 Introduction ● Memory is simple, in theory ● Complex in real use ● Plenty of strange things, too ● Important to understand ● Important to monitor
  • 5. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 5 Memory Types I ● Physical RAM – Fixed amount, real RAM ● Virtual Memory – Virtual, can swap ● Shared – Between processes ● Oracle & Postgres use this ● Slab – Kernel memory ● /proc/slabinfo & slabtop utility ● Includes big RAM users – tcpmem & inode cache
  • 6. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 6 Memory Types II ● Page Cache – File system cache ● Dirty ● Changed file system data waiting to write to disks ● Important for high write systems
  • 7. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 7 /proc/meminfo Very useful but complex ● These are items not found by 'free' or 'top' ● MemTotal: Total usable ram (RAM minus kernel binary code) ● MemFree: Total free memory, same as free's 'free' output ● SwapCached: Memory swapped out, then back in, but still also in the swapfile
  • 8. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 8 /proc/meminfo ● Active – Recently used, not reclaimed unless necessary ● Inactive – Less recently used, likely to be reclaimed ● Dirty – File / Page Cache waiting to be written to disk ● Writeback – Memory which is now being written to the disk ● Mapped – Memory Mapped files, such as libraries ● Includes Mongo, Varnish, and many others ● Slab – Kernel memory, usually 256-512MB
  • 9. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 9 Memory Page Size ● 4KB page size ● Important as many stats are in pages – Be careful of units ! KB vs. Pages ● sysctl items like tcpmem are mixed ● Do not confuse with disk sector size of 0.5KB
  • 10. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 10 Free -m ● Total – Physical in machine ● Used – by Apps plus Cache, Buffers and maybe Shared ● Free – Totally unused RAM, not important, usually very small ● Shared – by different processes like Oracle / Postgres ● Buffers – Raw block cache to/from disks, not impotrant ● Cached (Page Cache) – Used by disk files cached in RAM ● Swap – Total, Used, Free – Used should be small ● -/+ buffers/cache – Important numbers, inside box is key ● PAY ATTENTION to the BOX number – it's all that matters total used free shared buffers cached Mem: 3961 3901 60 0 121 1232 -/+ buffers/cache: 2546 1414 Swap: 4683 756 3927
  • 11. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 11 Top, ps Memory Output ● VIRT – Virtual size ● Includes mapped libraries, often very large ● Not too useful – IGNORE THIS ● RSS – Resident Set Size ● Most important ! ● Real RAM used by applications, not including swap ● SHR – Shared, such as Oracle / Postgres ● Be careful to see processes not threads ● Threads will share RSS, see htop in thread mode
  • 12. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 12 Swap ● Simple, but not simple ● Managed by kswapd ● Actual swap used calc ● SwapTotal – SwapCached – SwapFree ● Goal is zero swap on servers ● Never let a system actively swap ● But some systems will have small swap ● Common to see 100-200MB, more on big system ● NUMA defaults can cause swapping
  • 13. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 13 Problem with Swap ● Swapping FREEZES the swapping process ● So, a 32MB byte swap of MySQL RAM ● Freezes ALL of MySQL for many seconds ● Very bad for applications ● Bad for any single process system ● MySQL, Nginx, HAProxy, etc. (not Apache) ● Also uses valuable IO, slowing DBs, etc. ● Goal is to NEVER swap real applications
  • 14. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 14 Swappiness ● Tells kernel which is more important ● File system Cache vs. App Memory ● Default is 60 – Means cache more important ● Stupid for servers – will swap even with free RAM ● Set to 1, always (used to be 0, now use 1) ● Won't swap until all RAM used by applications ● Note some swap anyway (see next slide) ● Set by sysctl ● Check in /proc/sys/vm/swappiness
  • 15. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 15 Swap still happens ● Linux likes to swap a little ● Even with free RAM and swappiness = 0 ● Some kernel data wants to swap ● Can pre-swap SwapCached data ● Still a mystery, but it's okay ● Very large systems (64GB+ might swap 1-2GB) ● Turning off can cause kswapd to go crazy ● Watch vmstat swapin/out, make sure very small
  • 16. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 16 NUMA - Can cause swap ● NUMA – Non-Uniform Memory Access ● Each CPU has its own RAM ● Slower to use 'other' CPU's RAM ● Standard now on all Intel servers ● Causes RAM inbalance on big RAM processes ● Like MySQL, MongoDB, Java ● Install & use numa-utils package, numactl app ● Set all big processes to full interleave: ● numactrl –interleave all mysqld . . .
  • 17. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 17 Dirty Memory & Ratios ● Causes strange problems & performance issues ● See /proc/meminfo ● Dirty is the changed FileSystem cache data ● Must be written to disk ● Can cause big problems if too high ● Two ratios control ● /proc/sys/vm/dirty_background_ratio / _bytes ● /proc/sys/vm/dirty_ratio / _bytes ● Freezes all writing processes when dirty > dirty_ratio ● Calculation not clear, but keep dirty data < 20% of RAM
  • 18. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 18 OOM Killer ● Kills process when no more RAM or Swap ● Chooses process to die via a score ● Biggest RAM user (MySQL) often dies first ● See /proc/<pid>/oom_score ● Always a message in dmesg - /var/log/kernel ● Can adjust score to control (advanced) ● Best practice to monitor swap and log
  • 19. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2013 ChinaNetCloud 19 Summary ● Memory important to understand ● Especially basics & definitions ● Understand swap & swappiness ● Watch NUMA on big systems ● Memory is cheap – buy more !
  • 20. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 Copyright 2015 ChinaNetCloud 20 About ChinaNetCloud
  • 21. ChinaNetCloudRunning the World's Internet Servers 管理全球服务器 ChinaNetCloud Sales@ChinaNetCloud.com www.ChinaNetCloud.com Beijing Office: Lee World Business Building #305 57 Happiness Village Road, Chaoyang District Beijing, 100027 China Silicon Valley Office: California Avenue Palo Alto, 94123 USA Shanghai Headquarters: X2 Space 1-601, 1238 Xietu Lu Shanghai, 200032 China T: +86-21-6422-1946 F: +86-21- 6422-4911