The Response to Free Memory, Swap, Prophet and everything.


98 views
Uploaded on:
Category: News / Events
Description
The Response to Free Memory, Swap, Prophet and everything A presentation about utilizing memory where it's required most Christo Kutrovsky The Pythian Bunch 2007 April The Response to Free Memory, Swap, Prophet and everything The 45 minutes rendition
Transcripts
Slide 1

The Answer to Free Memory, Swap, Oracle and everything A presentation about utilizing memory where it’s required most Christo Kutrovsky The Pythian Group 2007 April

Slide 2

The Answer to Free Memory, Swap, Oracle and everything The 45 minutes form A presentation about utilizing memory where it’s required most Christo Kutrovsky The Pythian Group 2007 April

Slide 3

Who Am I? Joined Pythian in 2003 Became foreman for one of Pythian\'s administration conveyance groups in 2006 Notable customers: Palm Coast Data, Freshdirect.com Presented at Collaborate \'06, \'07, RMOUG Special enthusiasm for 11g, RAC, Disk IO execution, and memory Pythian\'s agent to the 11g beta, took an interest at the camp level (two visits)

Slide 4

Who is Pythian? Gives turnkey worldwide information building design and operations groups on a direct cost-to-exertion premise Founded in 1997, headquartered in Ottawa, Canada, with workplaces in India and Australia Supporting right around 100 customers overall and more than 600 creation databases Almost 50 generation specialists occupied with customer administration conveyance Broad information framework aptitude basically centered around Oracle, Microsoft SQL Server, and MySQL on big business equipment

Slide 5

Agenda Types of memory Virtual Memory territories How would we screen memory utilization And understand it Oracle cases Case examines

Slide 6

Questions what number engineers what number overseeing linux what number overseeing unix (AIX, solaris) what number have root get to what number have control of database memory utilization

Slide 7

Terminology What is memory The capacity of a PC framework to store information

Slide 8

Types of Memory Short term RAM (memory) Long term (“permament”) Disk, tape (stockpiling)

Slide 9

Types of Memory - physical CPU Registers speediest, exceptionally restricted CPU Cache (L1/L2/L3) some inactivity, LRU kept up RAM real dormancy (moderately), somewhat LRU Disk do something else while you hold up

Slide 10

What is RAM Faster, transitory capacity A work zone A spot where you put your information while you handle it

Slide 11

The Many reserves CPU Registers 2 ns CPU Cache 8 ns 1:4 Main Memory (RAM) 100ns 1:12 CPU Disk – Long term memory 3’000’000 ns 1: 30 ’ 000 TAPE – considerably more

Slide 12

CPU Cache & CPU Registers CPU Registers – your two hands (or more) You utilize them to hold the things while you chip away at them CPU Cache – your work area You utilize it as a rapidly available area to store your most utilized things Represents your present errands

Slide 13

Main Memory - RAM – Random Access Memory It’s like your office Need to get up from your work area to get things to deal with You typically snatch various at once to spare roundtrips

Slide 14

Our office Your hands 2 seconds CPU Cache “Desk” 4 sec. Primary Memory (RAM) “Your office” 12 seconds CPU Disk “Flying to Australia” 8 hours TAPE – utilize a load boat to go

Slide 15

Growing your office You generally require more Your “office” needs to handle all your dynamic customers, or they will be miserable Running out of space in your office is not adequate

Slide 16

The Disk – broadening the memory The Solution? Ship some of your minimum required fasteners to Australia Relatively complex procedure need to locate the slightest required folios need to know how to return them, when they are required

Slide 17

Introduction to virtual memory Processes “see” memory autonomously, as though it was separated from everyone else on the framework Each procedure has opportunity to utilize addresses in the entire “user address space” Typically – 3 Gb client space, 1 Gb framework space (on 32 bit)

Slide 18

Virtual memory mapping 32 bit tending to space 0 gb 1 gb 2 gb 3 gb 4 gb P1 P2 Reserved virtual area for the framework (part) RAM split into 4 kb pieces

Slide 19

VM Management Implemented by means of per procedure page table Indicates: page area (circle/memory) page consents (read/compose/execute) page properties (ex. duplicate on compose)

Slide 20

Virtual memory PTE table PTE Table for P1 rw – in RAM – 0xFFA rw – in RAM – 0xFFB RAM in RAM – 0xFFC – duplicate on compose w – unallocated rw – on circle - SWAP rx – on plate - FILE unallocated FILE SWAP P1

Slide 21

Additional advantages from VM Protection Features memory mapped documents in memory record framework shared memory shared memory – duplicate on compose Use all the more then what you have

Slide 22

Concept sorts of memory Shared at first exists on circle record cache(linux), supports, framework reserve at first does not exist on plate anonymous(linux), computed(aix) Private does not exist on circle extraordinary case duplicate on compose

Slide 23

Linux VM Components direct “user” dependant sorts of memory Buffers (shared) Cached (shared) Anonymous (private or shared) Hugepages aberrant (framework) oversaw zones Slab – portion structures PageTables

Slide 24

VM ranges with Oracle System User SLAB Buffers Mapped Anonymous (PGA,PLSQL exhibits) Pagetables Cached IPC Memory (SGA)

Slide 25

Monitoring Memory in view of Oracle

Slide 26

top most normally utilized instrument most confounded elucidation

Slide 27

top – test yield top - 22:03:11 up 3:19, 2 clients, burden normal: 2.98, 1.22, 0.52 Tasks: 89 all out, 1 running, 88 resting, 0 halted, 0 zombie Cpu0 : 0.7% us, 0.8% sy, 0.0% ni, 0.3% id, 98.0% wa, 0.2% hello there, 0.0% si Cpu1 : 0.0% us, 0.8% sy, 0.0% ni, 97.6% id, 1.4% wa, 0.2% howdy, 0.0% si Cpu2 : 0.0% us, 0.2% sy, 0.0% ni, 99.7% id, 0.2% wa, 0.0% greetings, 0.0% si Cpu3 : 0.2% us, 0.2% sy, 0.0% ni, 33.6% id, 66.1% wa, 0.0% howdy, 0.0% si Mem: 8310308k aggregate, 8049068k utilized, 261240k free, 36620k cradles Swap: 7823644k aggregate, 572k utilized, 7823072k free, 3395900k stored PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 8494 prophet 16 0 1662m 1.6g 1.5g D 2.0 19.8 0:03.15 oracletest (LOCAL=YES) 4796 prophet 16 0 1626m 1.5g S 1.0 19.5 0:03.91 ora_dbw1_test 4794 prophet 15 0 1626m 1.5g S 0.7 19.5 0:12.23 ora_dbw0_test 4798 prophet 16 0 1626m 1.5g S 0.7 19.5 0:03.97 ora_dbw2_test 4800 prophet 16 0 1626m 1.5g S 0.7 19.5 0:04.09 ora_dbw3_test 1 root 16 0 2384 600 512 S 0.0 0:00.86 init [3] 2 root RT 0 S 0.0 0:00.00 [migration/0] 3 root 34 19 0 S 0.0 0:00.00 [ksoftirqd/0]

Slide 28

Top – information originates from/proc/<pid>/status feline/proc/10450/status Name: prophet State: S (dozing) SleepAVG: 98% Tgid: 10450 Pid: 10450 PPid: 1 TracerPid: 0 Uid: 503 Gid: 503 FDSize: 256 Groups: 503 603 VmSize: 83424 kB VmLck: 0 kB VmRSS: 1484204 kB VmData: 1612 kB VmStk: 124 kB VmExe: 52720 kB VmLib: 8420 kB …

Slide 29

top – extra sections top can have extra segments swap record utilization figured code information THEY ARE ALL WRONG

Slide 30

vmstat 2 procs - memory - swap - io - framework - cpu - r b swpd free buff store si so bi bo in cs us sy id wa 0 3631424 11096 120204 0 35 31 255 20 0 99 0 3631488 11096 120204 0 1014 18 0 100 0 3631488 11096 120204 0 1012 16 0 100 0 r – run line – what number of procedures right now sitting tight for or running on the CPU b – what number of procedures holding up, generally tending to IO swpd – swap memory use free – free memory store – document framework reserve

Slide 31

vmstat cont vmstat 2 procs - memory - swap - io - framework - cpu - r b swpd free buff reserve si so bi bo in cs us sy id wa 0 3631424 11096 120204 0 35 31 255 20 0 99 0 3631488 11096 120204 0 1014 18 0 100 0 3631488 11096 120204 0 1012 16 0 100 0 si/so – swap in/out – in Kb/sec bi/bo – bytes in/out – in Kb/sec cs – setting switches us/sy/id/wa – client/framework/unmoving/sit tight time for CPUs

Slide 32

/proc/meminfo feline/proc/meminfo MemTotal: 8310308 kB MemFree: 93448 kB Buffers: 132036 kB Cached: 3413324 kB SwapCached: 0 kB Active: 1658252 kB Inactive: 1942032 kB HighTotal: 7470528 kB HighFree: 8768 kB LowTotal: 839780 kB LowFree: 84680 kB SwapTotal: 7823644 kB SwapFree: 7823072 kB Dirty: 100 kB Writeback: 0 kB Mapped: 82500 kB Slab: 92028 kB Committed_AS: 490700 kB PageTables: 3952 kB VmallocTotal: 106488 kB VmallocUsed: 5964 kB VmallocChunk: 99900 kB HugePages_Total: 2200 HugePages_Free: 1088 Hugepagesize: 2048 kB

Slide 33

/proc/meminfo – 64 bit SwapTotal: 4816888 kB SwapFree: 4192148 kB Dirty: 252 kB Writeback: 0 kB Mapped: 1350480 kB Slab: 461584 kB CommitLimit: 6851404 kB Committed_AS: 4959776 kB PageTables: 46668 kB VmallocTotal: 536870911 kB VmallocUsed: 2992 kB VmallocChunk: 536867847 kB HugePages_Total: 2000 HugePages_Free: 128 Hugepagesize: 2048 kB feline/p

Recommended
View more...