In this unit students explore the different situation types to which multiplication can be applied. Particularly, they engage with rate, comparison and array problems.
- Pose different types of word problems.
- Explain their mathematical thinking in solving problems.
- Use a variety of equipment to model their solutions.
The basic concept of multiplication is an important one because of its practicality (How much do 4 ice creams cost at $2 each) and efficiency (It is quicker to determine 4 x 2 than to calculate 2 + 2 + 2 + 2). Multiplication is used in many different situations. Here students think about multiplication as a short way to find the result of repeated addition of equal sets. They do so by solving rate problems, comparison problems and array problems.
A rate problem involves a statement of ‘so many of one quantity for so many of another quantity.’ All multiplication situations contain some form of rate but at this level, the problems are usually about equal sets or measurement. Take this example:
“Lena buys six bags of biscuits. Each bag contains four biscuits. How many biscuits does she buy altogether?”
This is an equal sets problem that contains the rate ‘four biscuits for every bag.’ A measurement rate problem is usually something like this:
“Hone’s kumara plant grows five centimetres each week after it sprouts. How long will his plant be after six weeks?”
The rate in Hone’s problem is “five centimetres for every week.” Comparison problems involve the relationship between two quantities. For example:
“Min’s apartment block has three floors. Anshul’s block has 12 floors. How much taller is Anshul’s block than Min’s?”
An additive answer is 12 – 3 = 9 floors. A multiplicative answer is 4 x 3 =12 so Anshul’s block is four times higher than Min’s. An array is a structure of rows and columns. For example, this chocolate block has two rows of five pieces (2 x 5 or 5 x 2).
An array is a structure of rows and columns. For example, this chocolate block has two rows of five pieces (2 x 5 or 5 x 2).
Array problems can help students to see the commutative property of multiplication, for example, that 5 x 2 = 2 x 5. In other words, the order of the factors does not affect the product (answer) in multiplication.
As well as thinking about multiplication in a variety of situations, students are encouraged to use a variety of materials to solve the problems. Using a variety of materials can help students see the multiplicative structure that is common to a variety of problems and assist them to transfer their understanding to situations which are new to them.
This unit can be differentiated by varying the scaffolding provided to make the learning opportunities accessible to a range of learners. For example:
- accept students’ use of counting strategies to solve multiplicative problems, as needed
- have students use materials or diagrams to support their thinking, as needed
- work in small groups with students who need additional support, solving problems together.
Focus on familiar contexts which include multiplicative situations to appeal to students’ interests and experiences and encourage engagement. Examples may include:
- lines of students in kapa haka groups
- collecting bags of pipi or other shellfish
- crews of students racing in waka ama
- loaves of bread for a school or community event
- groups of people travelling in vans, cars or buses
- preparing bundles of harakeke for weaving.
- Introduce the session by asking the students to work through several equal group [set] problems first and then ask them to pose their own problems. For example:
- There are 8 cars. Each one has 2 people in it. How many people are there altogether?
- There are 6 fish bowls. Each bowl contains 4 goldfish. How many goldfish are there altogether?
- There are 7 tables. Each table has 3 legs. How many legs altogether?
- The students can represent these and similar ‘equal sets’ problems with:
- towers of interlocking cubes
- threading beads
- jumps on the number line
- interlocking cubes on a number track
- drawing a picture to show the number of tables and the corresponding number of legs.
- Note: It is important to link the examples (where possible) to the structure of repeated addition of equivalent sets as multiplication. For example: 4 + 4 + 4 + 4 + 4 + 4 + 4 = 28 or 7 x 4 = 28. Discuss what the numbers 4, 7, and 28 refer to and what the operations symbols + and x refer to. The multiplication symbols can be thought of as meaning ‘of’. For example, 7 x 4 = 20 means seven sets of four.
- Now ask the students to make up word problems using the problem structure above with different answers. For example, “Write a multiplication problem with an answer of 24”.
- Use several sets of ice-cream containers (all with the same number of items in them) with the contents of each covered except for one. Ask the students to write story problems for each example.
- What strategy do the students use to solve the problems?
- Do they try to count the contents of each ice-cream container by ones; that is those that are visible and those that are concealed?
- Do they use skip counting, e.g. 3, 6, 9, …, or repeated addition, e.g. 3 + 3 = 6, 6 + 3 = 9, …?
- Do they apply multiplication facts, e.g. 5 x 3 = 15 so 6 x 3 = 18 (3 more)?
- Be aware that students’ choice of strategy depends on the connection between the conditions of each problem and the number resources that they have available. Expect that strategies of individual students will be variable.
Over the next three days the students are exposed to a variety of different types of story problems. They are encouraged to model the problems using different equipment and explain their answers to others. They think about the most efficient ways of solving the problems. It is important that students are provided with opportunities to build up multiplication facts to 10 and then to 20. Some students may solve these problems without equipment, using the number knowledge they have available.
- On the first day work through several measurement rate problems. It is good if students notice that the situations are structurally similar to the ‘equal sets’ problems from the previous session. Measurement quantities, especially time, are more intangible than ‘bags of’ or ‘packets of’ in equal sets situations. Acting out problems can support students to see the common structure.
- Use these measurement rate situations:
[Name] can write her name in 10 seconds. How long does he/she take to write his/her name four times?
You might select a student to role play writing their name and use an analogue clock (less battery) and/or stacks of cubes to track the time in seconds
[Name] drinks four cups of water each day. How many cups does he/she drink in one week?
Use plastic cups to build up the equal sets of four cups that are involved in this problem. Use another material to track the number of days.
[Name] sews five buttons on every shirt. How many buttons does he/she need for eight shirts?
[Name] puts three spoons of Milo in each cup. How many spoons of Milo does he/she need for 10 cups?
These problems are more accessible than the time related tasks. Shirts can be cut out of paper and buttons represented by counters. Cups and plastic spoons can be used to model the Milo problem. Both quantities in each rate are tangible.
- Copymaster One has some rate problems for students to solve. The problems contain a mixture of tangible and intangible units.
The students can create similar types of problems with pictures and pose the problems to each other. Encourage them to explain their strategies to each other.
- After time solving the problems, gather the class.
Discuss what is the same about all the problems you have just worked on.
Do students express the idea of a rate as being a “for every” relationship?
Now ask the students to make up similar word problems and to pose their problems to each other. Encourage them to explain their answers to each other.
- On the second day of exploration use PowerPoint One to expose your students to comparison situations. The first preference of students may be to look for additive relationships. For example, here is a correct additive response to the question on Slide One.
How much taller is Jill’s apartment block than Jack’s apartment block?
S: Jill’s apartment block has 12 floors and Jack’s has four floors. Jill’s block is eight floors higher.
Students may not offer a ‘times as many’ multiplicative answer. If that occurs pose this problem:
Jill says that her apartment block is three time higher than Jack’s block. I wonder what she means?
- Slides Two and Three shows the additive and multiplicative comparisons that can be made.
Look for students to note the inverse relationships:
S: Jack’s apartment block is eight floors less (shorter) than Jill’s.
S: Jack’s apartment block is one third of the height of Jill’s.
- Work through the other slides of PowerPoint One looking to see if students identify the common structure of finding difference (additive) and finding the scale factor (multiplicative).
- Copymaster Two contains many multiplicative comparison problems. Some problems are in the form where the relationship is required while others require application of a given scale factor. Students are also encouraged to write equations to represent the situations. Let the students solve the problems, with the support of materials like counters if they need it. After a suitable time share the answers as a class.
- Do your students:
- Recognise the meaning of “times as many.”?
- Represent the situations correctly with materials?
- Identify the scale factor and the set to be scaled?
- Record the equations correctly?
- On the third day of exploration work through several array problems based on situations in which there are equal groups. When modelling arrays, it may be helpful to talk about the lines across as ‘rows’ and the lines up and down as ‘columns’. Teams with the same number of members in each are often used during the school day.
Pose problems such as:
The students are lined up in 3 teams for sport. Each team has 6 members. How many students are there altogether?
Encourage the students to draw representations of problems like this using three rows (one for each team) and six columns (one for each team member). Alternatively, use the students as the objects in the problem. If students draw the situation as three columns of six it opens discussion of the commutative property since 6 x 3 = 3 x 6.
- Other problems you might use include:
- A tray of eggs has five rows and six columns.How many eggs are in the tray altogether?
- The carpark has four rows. Ten cars park in each row. How many cars can be parked altogether?
- A chocolate block has six columns, with four pieces in each column. How many pieces are in the whole block?
- A ‘Connect Four’ board has seven columns, with six holes in each column. How many counters can fit on the whole array?
- The students can model these and other array problems with
- pegboards: pegs on a pegboard can be used to illustrate arrays in multiplication.
For the problem above this could be talked about as 3 rows of 6 pegs or 3 sixes,
or 3 rows of 6, or 3 x 6 = 18
By turning the pegboard a quarter turn, the array still has a total of 18 pegs.
This could be talked about as 6 columns of 3 pegs or 3 rows of 6 pegs or 6 threes
or 6 columns of 3 or 6 X 3 + 18.
- interlocking cubes
- colouring grid paper
- pegboards: pegs on a pegboard can be used to illustrate arrays in multiplication.
- Copymaster Three contains some problems related to arrays. Encourage your students to record an equation for each array, to show how they found the total number of objects.
On the final day of the unit we play a game called Array Trap in which the students use graph paper to plot arrays.
For this activity you will need
- a sheet of graph paper for each player (At least 30 x 20 squares);
- 3 x ten-sided dice - each side has a different digit on it (You can use 3 x standard 1-6 dice, but the facts are limited)
- different coloured felt pens
Players take turns to:
- Roll the dice and choose two, for example 8 and 2;
- Mark out a rectangle of that size, for example 8 rows of 2, or 2 columns of 8; or a different pair of factors with the same area, for example, four columns of four.
- Write the multiplication basic fact in the rectangle, for example 8 x 2 = 16 or 2 x 8 = 16;
- Players take turns until one player is trapped. That is, they are unable to find space for the array they have rolled.
Discuss strategies for the game such as:
- Placing large arrays near the edge to maximise the space available for more arrays.
- Renaming the factors so the array fits a given space

Sa aonaid seo, scrúdaíonn mic léinn na cineálacha éagsúla cásanna ar féidir moltaí a chur i bhfeidhm orthu. Go háirithe, déileálann siad le fadhbanna ráta, comparáide agus sraithe.
- Glacann sé le cineálacha éagsúla fadhbanna focail.
- Mínigh a gcuid smaointeoireachta matamaitice i réitigh fhadhbanna.
- Úsáid trealamh éagsúla chun a gcuid réitigh a mhodhnú.
Tá an bunchoincheap maidir le héileamh tábhachtach mar gheall ar a phraiticiúlacht (Cé mhéad a chosnaíonn 4 uachtar reoite ag $ 2 an ceann) agus éifeachtúlacht (Tá sé níos gasta 4 x 2 a chinneadh ná 2 + 2 + 2 + 2 a ríomh). Úsáidtear iolrú i go leor cásanna éagsúla. Anseo smaoiníonn mic léinn ar iolrú mar bhealach gearr chun toradh na haisithe athfhillte de shraith chomhionann a fháil. Déantar é sin trí fhadhbanna ráta, fadhbanna comparáide agus fadhbanna sraithe a réiteach.
I gceist le fadhb ráta ráiteas de  an oiread sin de mhéid amháin le haghaidh an oiread sin de mhéid eile. Tá roinnt cineál ráta i ngach cás iolrú ach ag an leibhéal seo, is gnách go mbíonn na fadhbanna faoi shraith chomhionann nó tomhas. Tóg an sampla seo:
Tá Lena ag ceannach sé mála biscuit. Tá ceithre bhricfeasta i ngach mála. Cé mhéad brioscaí a cheannaíonn sí ar fad?
Is fadhb tacar comhionann é seo ina bhfuil an ráta  ceithre bhrispéid do gach mála. Is gnách go bhfuil fadhb ráta tomhais mar seo:
Fásann plandaí cumara mil cúig ceintiméadar gach seachtain tar éis dóibh a bheith ag fás. Cé chomh fada a bheidh a phlanda tar éis sé seachtaine?
Is é an ráta i bhfadhb Hone  cúig sheantiméadar gach seachtain. Baineann fadhbanna comparáide leis an gcaidreamh idir dhá mhéid. Mar shampla:
Tá trí urlár ag bloc árasán an Aire. Tá 12 urlár ag bloc Anshul. Cé mhéad níos airde is é bloc Anshul ná Min?
Is é freagra breise ná 12  3 = 9 urlár. Is é freagra iolraitheach 4 x 3 = 12 mar sin tá bloc Anshuls ceithre huaire níos airde ná Mins. Is struchtúr de shraith agus de cholún é sraith. Mar shampla, tá dhá shraith de chúig phíosa (2 x 5 nó 5 x 2) ag an mbloc seacláide seo.
Is struchtúr de shraith agus de cholún é sraith. Mar shampla, tá dhá shraith de chúig phíosa (2 x 5 nó 5 x 2) ag an mbloc seacláide seo.
Is féidir le fadhbanna sraithe cabhrú le mic léinn an t-earraí commutative a fheiceáil i ndlúthchuid, mar shampla, go bhfuil 5 x 2 = 2 x 5. I bhfocail eile, ní dhéanann ord na ngnéithe difear don táirge (freagra) i gcúpla.
Chomh maith le smaoineamh ar mhéadú i gcúinsí éagsúla, spreagtar daltaí ábhair éagsúla a úsáid chun na fadhbanna a réiteach. Is féidir le húsáid ábhair éagsúla cabhrú le mic léinn an struchtúr iolraitheach a fheiceáil atá coitianta do fhadhbanna éagsúla agus cabhrú leo a dtuiscint a aistriú go cásanna atá nua dóibh.
Is féidir an t-aonad seo a idirdhealú trí na scaffolding a chuirtear ar fáil a athrú chun na deiseanna foghlama a chur ar fáil do raon foghlaimeoirí. Mar shampla:
- glacadh le húsáid straitéisí comhaireamh ag mic léinn chun fadhbanna iolraitheacha a réiteach, de réir mar is gá
- a bheith ag na daltaí ábhair nó léaráidí a úsáid chun tacú lena gcuid smaointeoireachta, de réir mar is gá
- obair i ngrúpaí beaga le mic léinn a bhfuil tacaíocht bhreise de dhíth orthu, ag réiteach fadhbanna le chéile.
Díriú ar chomhthéacsanna eolacha lena n-áirítear cásanna iolraitheacha chun achomharc a dhéanamh ar leasanna agus ar thaithí na scoláirí agus rannpháirtíocht a spreagadh. Is féidir le samplaí a bheith ina measc:
- línte de dhaltaí i ngrúpaí kapa haka
- málaí bailiúcháin pipi nó muiceolaí eile
- foirne de mhic léinn ag rás i waka ama
- arán arán le haghaidh imeacht scoile nó pobail
- grúpaí daoine ag taisteal i mbánna, i gcarranna nó i mbusanna
- pacáistí harakeke a ullmhú le fíodáil.
- Cuir isteach an seisiún trí iarraidh ar na daltaí oibriú trí roinnt fadhbanna grúpa comhionanna ar dtús agus ansin iarr orthu a gcuid fadhbanna féin a chur i láthair. Mar shampla:
- Tá 8 charr ann. Tá 2 dhuine i ngach ceann acu. Cé mhéad duine atá ann go léir?
- Tá 6 bowl iasc. Tá 4 iasc órga in gach bowl. Cé mhéad iasc órga atá ann go léir?
- Tá 7 tábla ann. Tá 3 chos ag gach tábla. Cé mhéad cosa go léir?
- Is féidir leis na mic léinn na fadhbanna seo agus fadhbanna "sets comhionann" eile a léiriú le:
- túir de chubhanna idir-cheangail
- beanna fíneáil
- léim ar an líne uimhir
- ciúbanna a cheangail ar shraith uimhreacha
- pictiúr a tharraingt chun líon na mbord agus líon na gcosa a thaispeáint.
- Nóta: Tá sé tábhachtach na samplaí a nascadh (más féidir) leis an struchtúr a bhaineann le haiscthe arís agus arís eile de shraith chomhionann mar mhéadú. Mar shampla: 4 + 4 + 4 + 4 + 4 + 4 + 4 = 28 nó 7 x 4 = 28. Déan plé ar na huimhreacha 4, 7 agus 28 agus ar na siombailí + agus x a bhaineann leo. Is féidir na siombailí iolrú a shamhlú mar chiall  de . Mar shampla, ciallaíonn 7 x 4 = 20 seacht sraith de cheithre.
- Iarr ar na daltaí anois fadhbanna focal a dhéanamh ag baint úsáide as struchtúr na bhfreagraí thuas le freagraí éagsúla. Mar shampla,  Scríobh fadhb iolrú le freagra 24.
- Úsáid roinnt sraitheanna de choimeádáin uachtar reoite (agus an líon céanna earraí iontu) agus an t-ábhar i ngach ceann acu clúdaithe ach amháin ceann amháin. Iarr ar na daltaí fadhbanna scéalta a scríobh do gach sampla.
- Cén straitéis a úsáideann na mic léinn chun na fadhbanna a réiteach?
- An ndéanann siad iarracht ábhar gach coimeádán uachtar reoite a chomhaireamh de réir aonad; is é sin iad siúd atá le feiceáil agus iad siúd atá i bhfolach?
- An úsáideann siad scipeáil a chomhaireamh, e.g. 3, 6, 9, ..., nó breiseán arís agus arís eile, e.g. 3 + 3 = 6, 6 + 3 = 9, ...?
- An gcuireann siad fíricí i bhfeidhm maidir le héaduithe, e.g. 5 x 3 = 15 mar sin 6 x 3 = 18 (3 níos mó)?
- Bíodh a fhios agat go bhfuil rogha na straitéise ag na daltaí ag brath ar an nasc idir coinníollacha gach fhadhb agus na hacmhainní uimhreacha atá ar fáil dóibh. Táthar ag súil go mbeidh straitéisí na mac léinn aonair éagsúil.
Le trí lá eile, bíonn na mic léinn faoi lé go leor cineálacha éagsúla fadhbanna scéalta. Spreagtar iad chun na fadhbanna a múnlú ag baint úsáide as trealamh éagsúil agus a gcuid freagraí a mhíniú do dhaoine eile. Smaoiníonn siad ar na bealaí is éifeachtaí chun na fadhbanna a réiteach. Tá sé tábhachtach go gcuirfear deiseanna ar fáil do dhaltaí chun fíricí iolrú a thógáil go 10 agus ansin go 20. D'fhéadfadh roinnt daltaí na fadhbanna seo a réiteach gan trealamh, ag baint úsáide as an eolas uimhreacha atá ar fáil acu.
- Ar an gcéad lá oibre trí roinnt fadhbanna ráta tomhais. Is maith má thugann na daltaí faoi deara go bhfuil na cásanna cosúil go struchtúrach leis na fadhbanna "sets comhionann" ón seisiún roimhe seo. Tá méideanna tomhais, go háirithe am, níos neamhthaithne ná  baganna  nó  pacáistí  i gcásanna sraitheanna comhionanna. Is féidir le fadhbanna a léiriú a bheith ina gcúnamh do dhaltaí an struchtúr coiteann a fheiceáil.
- Úsáid na cásanna seo maidir le ráta tomhais:
Is féidir le [ainm] a ainm a scríobh i 10 soicind. Cé chomh fada a thógann sé/sí a ainm a scríobh ceithre huaire?
D'fhéadfá mac léinn a roghnú chun ról a imirt ag scríobh a n-ainm agus ag baint úsáide as clog analógach (batterí níos lú) agus / nó stailc de chubhanna chun an t-am a rianú i soicind
Ólann [ainm] ceithre chupan uisce gach lá. Cé mhéad cupán a ólann sé/sí i gceann seachtaine?
Úsáid cupáin plaisteacha chun na sraitheanna comhionanna de cheithre cupán a thógáil a bhfuil baint acu leis an bhfadhb seo. Úsáid ábhar eile chun líon na laethanta a rianú.
[ainm] sews cúig cnaipí ar gach léine. Cé mhéad cnaipí a theastaíonn do ocht léine?
Cuireann [ainm] trí spúnóg Milo i ngach cupán. Cé mhéad spúnóg Milo a theastaíonn le haghaidh 10 cupán?
Tá na fadhbanna seo níos inrochtana ná na tascanna a bhaineann leis an am. Is féidir léinte a ghearradh as páipéar agus cnaipí a léiriú le cuntais. Is féidir cupáin agus spúnóg plaisteach a úsáid chun an fhadhb Milo a mhodhnú. Tá an dá mhéid i ngach ráta inláimhsithe.
- Copymaster Tá roinnt fadhbanna ráta do mhic léinn a réiteach. Tá meascán de aonaid inláimhsithe agus inláimhsithe sna fadhbanna.
Is féidir leis na mic léinn cineálacha fadhbanna den chineál céanna a chruthú le pictiúir agus na fadhbanna a chur i láthair dá chéile. Spreag iad a gcuid straitéisí a mhíniú dá chéile.
- Tar éis am a réiteach na fadhbanna, a bhailiú an rang.
Déan plé ar na rudaí a bhfuil an rud céanna acu maidir leis na fadhbanna go léir a d'oibrigh tú orthu.
An léiríonn daltaí an smaoineamh ar ráta mar do gach  caidreamh?
Anois iarr ar na mic léinn fadhbanna focal den chineál céanna a dhéanamh suas agus a gcuid fadhbanna a chur i láthair dá chéile. Spreag iad a gcuid freagraí a mhíniú dá chéile.
- Ar an dara lá den iniúchadh úsáid PowerPoint One chun do mhic léinn a nochtadh do chásanna comparáide. B'fhéidir gurb é an chéad rogha atá ag mic léinn ná caidreamh breiseán a lorg. Mar shampla, seo freagra ceart breise ar an gceist ar an gcéad sleamhnán.
Cé mhéad níos airde is é bloc árasán Jill ná bloc árasán Jack?
S: Tá 12 urlár ag bloc árasán Jill agus ceithre urlár ag Jack. Tá bloc Jill ocht urlár níos airde.
Ní fhéadfaidh daltaí freagra iolraitheach a thabhairt "i bhfad níos mó". Má tharlaíonn sé sin, tá an fhadhb seo ann:
Deir Jill go bhfuil a bloc árasán trí huaire níos airde ná bloc Jack. N'fheadar cad a chiallaíonn sí?
- Léiríonn sleamhnáin a dó agus a trí na comparáidí breiseúla agus iolraitheacha is féidir a dhéanamh.
Féach ar na daltaí na caidrimh inverse a thabhairt faoi deara:
S: Tá bloc árasán Jack's ocht urlár níos lú (is gearr) ná Jill's.
S: Tá bloc árasán Jack's ar an tríú cuid de airde Jill's.
- Déan obair trí na sleamhnáin eile de PowerPoint One ag féachaint an aithníonn daltaí an struchtúr coitianta maidir le difríocht a aimsiú (cuimsiú) agus an fachtóir scála a aimsiú (iomadaíocht).
- Tá go leor fadhbanna comparáide iolraitheach i Copymaster Two. Tá roinnt fadhbanna sa fhoirm ina n-éilítear an gaol agus éilíonn daoine eile feidhmíocht fachtóir scála áirithe. Spreagtar mic léinn freisin chun ecuais a scríobh chun na cásanna a léiriú. Lig do na mic léinn na fadhbanna a réiteach, le tacaíocht ó ábhair cosúil le cuntóirí más gá dóibh é. Tar éis ama oiriúnach, roinn na freagraí mar chlas.
- An bhfuil do mhic léinn:
- Aithníonn an bhrí de times mar go leor.?
- Na cásanna a léiriú go ceart le hábhair?
- Aithint an fhachtóir scála agus an tacar a scálaítear?
- An bhfuil na hoiriúnacha taifeadta i gceart?
- Ar an tríú lá den iniúchadh obair trí roinnt fadhbanna array bunaithe ar chásanna ina bhfuil grúpaí comhionanna. Agus sraitheanna á mhodhnú, d'fhéadfadh sé a bheith cabhrach labhairt faoi na línte trasna mar  sraitheanna agus na línte suas agus síos mar  cúlraí. Is minic a úsáidtear foirne leis an líon céanna comhaltaí i ngach ceann acu le linn an lae scoile.
Tá fadhbanna mar seo a leanas ann:
Tá na mic léinn suite i 3 fhoireann le haghaidh spóirt. Tá 6 chomhalta ag gach foireann. Cé mhéad mac léinn atá ann go léir?
Spreag na mic léinn chun léiriúcháin fadhbanna mar seo a tharraingt ag baint úsáide as trí shraith (aon cheann do gach foireann) agus sé cholún (aon cheann do gach ball foirne). Ina ionad sin, bain úsáid as na mic léinn mar na réada sa fhadhb. Má tharraingíonn mic léinn an staid mar thrí cholún de shé, osclaíonn sé plé ar an maoin choimhthíoch ós rud é go bhfuil 6 x 3 = 3 x 6.
- I measc na gcúinsí eile a d'fhéadfadh tú a úsáid tá:
- Tá cúig shraith agus sé cholún ag tráidire uibheacha. Cé mhéad uibheacha atá sa tráidire ar fad?
- Tá ceithre shraith sa pháircáil. Déag carr páirceáil i ngach sraith. Cé mhéad carr is féidir a phárú ar fad?
- Tá sé cholún ag bloic seacláide, le ceithre phíosa i ngach colún. Cé mhéad píosaí atá sa bhloc iomlán?
- Tá seacht colún ag bord 'Connect Four', le sé pholl i ngach colún. Cé mhéad cuntóir is féidir a chur ar an array iomlán?
- Is féidir leis na mic léinn na fadhbanna seo agus fadhbanna eile a mhodhnú le
- pegboards: is féidir pegs ar pegboard a úsáid chun sraitheanna a léiriú i moltaí.
Maidir leis an fhadhb thuas d'fhéadfaí labhairt faoi seo mar 3 shraith de 6 phéaga nó 3 shéaga,
nó 3 shraith de 6, nó 3 x 6 = 18
Trí an tábla peg a thiontú ar chúig an chlog, tá 18 pegs san iomlán fós sa tsraith.
D'fhéadfaí é seo a labhairt mar 6 colún de 3 pingin nó 3 shraith de 6 pingin nó 6 triúr
nó 6 cholún de 3 nó 6 X 3 + 18.
- ciúbanna a cheangail
- páipéar griolla datha
- pegboards: is féidir pegs ar pegboard a úsáid chun sraitheanna a léiriú i moltaí.
- Tá roinnt fadhbanna ag Copymaster Three a bhaineann le sraitheanna. Spreag do dhaltaí chun ecuacion do gach sraith a thaifeadadh, chun a thaispeáint conas a fuair siad líon iomlán na n-ábhar.
Ar an lá deiridh den aonad a imirt muid cluiche ar a dtugtar Array Trap ina bhfuil na mic léinn úsáid páipéar grafaí a phláta arrays.
Chun an ghníomhaíocht seo beidh ort
- bileog páipéir grafaí do gach imreoir (Ar a laghad 30 x 20 cearnóg);
- 3 x dé-taobh dáis - tá gach taobh digit difriúil air (Is féidir leat 3 x dáis chaighdeánach 1-6 a úsáid, ach tá na fíricí teoranta)
- píolóid feilte éagsúla
Bíonn imreoirí ag casadh ar:
- Rolla an dáis agus roghnaigh dhá, mar shampla 8 agus 2;
- Déan ríchill den mhéid sin a mharcáil, mar shampla 8 shraith de 2, nó 2 cholún de 8; nó péire fachtóirí éagsúla leis an limistéar céanna, mar shampla, ceithre cholún de cheithre.
- Scríobh an fhíric bhunúsach i gceathrú ceathrú, mar shampla 8 x 2 = 16 nó 2 x 8 = 16;
- Tá imreoirí ag casadh go dtí go bhfuil imreoir amháin gafa. Is é sin, nach bhfuil siad in ann a fháil ar an spás do an sraith a bhfuil siad rolladh.
Déan plé ar straitéisí don chluiche mar shampla:
- Réimsí móra a chur in aice leis an imeall chun an spás atá ar fáil do níos mó réimsí a uasmhéadú.
- Athainmniú na tosca ionas go n-oireann an t-earráid spás ar leith


Gospel of Mark Chapter 11:12-26 Summary
Day One in the Big City
- The next day, Jesus is hungry as they commute from the suburbs back to Jerusalem.
- In the distance he sees a fig tree all in bloom, and his tummy growls. Yummy.
- Coming closer, Jesus realizes the tree has leaves, but no figs. Sorry, Jesus, this restaurant is closed.
- Jesus curses the tree, whose fruit no one will eat ever again. Harsh.
- In Jerusalem, they enter the temple, where Jesus drives out the merchants and their customers, overturns the tables of those exchanging money and the seats of those selling doves.
- Jesus teaches everyone that in scripture, the temple is supposed to be a place for both Jews and non-Jews to pray (quoting Isaiah 56:7), not a place to steal everyone's money. They've turned the temple into a racket (quoting Jeremiah 7:11).
- The chief priests and the scribes overhear and begin to devise a plan to wipe this pesky Jesus out once and for all.
- In the evening, Jesus returns to Jerusalem's suburbs with his disciples, who notice that the fig tree Jesus cursed earlier that morning has withered.
- Jesus takes the opportunity to instruct the disciples how to pray.
- Faith is the key ingredient. With it, your prayers can move mountains, and what you ask for you will receive.
- While you pray, you should forgive people's offenses against you, and then God will forgive your own mistakes.
- The KJV reads 11:26 with the inverse: if you don't forgive others, God will not forgive you. But the NRSV omits this verse. Why? The translators are following different manuscripts of Mark, some of the very earliest of which do not include these words.
People who Shmooped this also Shmooped...

Soiscéal Mharca Caibidil 11:12-26 achoimre
An Chéad Lá sa Chathair Mhór
- An lá dar gcionn, tá ocras ar Íosa agus iad ag taisteal ó na bruachbhailte ar ais go Iarúsailéim.
- Sa chiall feiceann sé crann fígín go léir i bláthanna, agus a bolg grumble. Yummy.
- Ag teacht níos gaire, tuigeann Íosa go bhfuil duilleoga ag an gcrann, ach gan fíonchaora. Tá brón orm, Íosa, tá an bialann seo dúnta.
- Jesus curses an crann, a bhfuil torthaí aon duine a ithe riamh arís. Dúr.
- I Iarúsailéim, téann siad isteach sa teampall, áit a bhfuil Íosa ag cur amach na ceannaitheoirí agus a gcustaiméirí, casann sé táblaí na n-airgead-aistriú agus suíocháin na ndíoltóirí colm.
- Múineann Íosa gach duine go bhfuil sa scrioptúr, tá an teampall ceaptha a bheith ina áit do Giúdaigh agus neamh-Giúdaigh a guí (ag lua Isaiah 56: 7), ní áit a ghoid airgead gach duine. Tá siad tar éis an teampall a thiontú ina raicéad (ag lua Iarmáia 7:11).
- An príomh-sagairt agus na scríobhaithe overhear agus tús a chur le plean a dhéanamh chun a scriosadh an t-Is Íosa annoying amach uair amháin agus go léir.
- Sa tráthnóna, téann Íosa ar ais go bruachbhaile Iarúsailéim lena dheisceabail, a thugann faoi deara go bhfuil an fígín a rinne Íosa mallacht air níos luaithe an mhaidin sin triomaithe.
- Jesus a thógann an deis chun a chur ar an múinteoirí conas a guí.
- Is é an creideamh an príomh-chomhábhar. Leis, is féidir le do chuid guí sléibhte a bhogadh, agus gheobhaidh tú an rud a iarrann tú.
- Cé go bhfuil tú ag guí, ba chóir duit a ghabháil le daoine offenses i do choinne, agus ansin Dia a ghabháil do chuid earráidí féin.
- Léann an KJV 11:26 leis an mhalairt: mura gcaithfidh tú daoine eile, ní thabharfaidh Dia duit. Ach ní chuirtear an véarsa seo san áireamh sa NRSV. Cén fáth? Tá na haistriúcháin ag leanúint lámhscríbhinní éagsúla de Mhárc, agus níl na focail seo ar roinnt de na cinn is sine.
Daoine a Shmooped seo freisin Shmooped...


After receiving a confidential report about a pair of large cats that were spotted in Cameron County, Fox 2 news decided to explore a new trend invading many South Texas homes. It is a world where you can apply Charles Darwin’s theory on survival of the fittest. For centuries, animals have competed with people for food and space, but our intelligence has allowed us to become the dominant species, and that powerful trait has spurred people to remove all other creatures from their natural habitats to domesticate them.
For some, having the typical fish tank is not enough, so they seek bigger and better trophies like wild cats and poisonous snakes.
“Big cats are a symbol of power since ancient times. People that have the means to acquire tigers and lions, and it is not illegal to have them as pets.”
They can cost up to 10 thousand dollars, says biologist Jaime Pena from the Gladys’s Porter Zoo in Brownsville, Texas. The problem is once they get too big or aggressive people either give them away or release them out in the county.
“They will compete for prey with other local animals like the indigo snake or bull snake. Once there is an imbalance in the ecosystem it’s a chain reaction. Everything will be affected by it.”
But can those animals be blamed for disrupting the ecosystem? Refuges have been set aside as a safe place for many species.
“Only certain locations are protected by the federal government. Here at Laguna Atascosa National Park in Cameron County there are three varieties of wild cats. The last encounter with a jaguar in South Texas was in the 1950s in the San Benito area.”
Wild animals prefer to live far away from civilization. When they are captured they can become a huge responsibility. Barbara Hoffmann, are tired circus performer, owns tigers, leopards, and other exotic animals, but she says it’s her 20 years of experience that has allowed her to care for her pets safely.
“What I have here is an educational facility. Most likely unless I take the big show out into the community these cats would not leave their cages, which I’m getting permission to construct right here in Hidalgo County.”
We paid animal control in Brownsville a visit to see if a license is required to own exotic pets, and officer Arturo Martinez says one is not needed, however you must pay close attention to city and county ordinances. For example, an order in Hidalgo County bans ownership of ‘dangerous wild animals’. If these animals raise a concern for safety, where are people getting them from?
“We found the Asian gypsy moth. We also discovered birds that people were trying to smuggle in, and we turned them over to fish and wildlife.”
Customs and border protection spokesperson, Eddie Perez, adds that the agency’s officers are highly trained, but smugglers are always trying to find creative ways to cross animals.
“Just this year we received six tiger cubs. They were seized from the lady that was trying to sell them. Our lions in our collection are part of a DEA drug bust. In the past when we had jaguars they were confiscated at the International Bridge, people were trying to cross them from Mexico.” Statistics show that several species are on the brink of extinction yet people continue to remove them from their natural habitats. Most only live up to two years in captivity. Tomorrow, during part two of my investigation, find out if the cost to raise an exotic animal makes it all worthwhile.
The cost to feed an exotic animal is only part of the owner's liability. Like we said before, you don't need a license to own one, but there are many more laws that can get you in the long run. Their natural beauty, grace, and mystery are reasons why people are drawn to exotic animals, and there are those that get so intrigued by these creatures that they want one as a pet.
In Florida, several residents started releasing their pet boas into the wild, and now they are competing with alligators.
"With the boas, they are preying on populations that are generally not doing well, because of habitat loss already."
Closer to south Texas, in Matamoros, Tamaulipas Mexico it has been confirmed that there is a black market for exotic animals. Usually members of the elite class purchase them, because they are priced in the thousand-dollar range. In the U.S. it is perfectly legal to own exotic pets like tigers, lions, water dragons, and venomous snakes, but you cannot exhibit or sell them.
Barbara Hoffmann, who ran a traveling circus act for twenty years, is trying to convince Hidalgo County to allow her to show off her animals as part of an educational show for kids.
"It's only a restriction if the county or state decides to put a restriction on it or prohibit it. I don't blame them for not wanting them as pets. They are not pet quality animals. They never have been and shouldn't be."
Hoffmann left Cameron County a few weeks ago since she could not find a property big enough for her pets.
"Recently, the city of San Benito told her that we are trying to develop that land and we were told that she has to relocate and she did, and as far as having problems with her none at all."
Aside from finding the right place to house large exotic animals, the cost to feed them can be hectic.
"Big cats, they can consume from a thousand to two thousand dollars worth of meat every week."
That's why some owners set them free creating room for an unwanted encounter with one of these beasts
"Certainly not to disturb it, especially if it's in the vein of a large cat or an alligator that is in an area that they may not want it to be in, because there are trained people that can go out and handle the situation."
Ultimately, is it possible to domesticate an exotic animal?
"These are wild animals and will forever be wild animals. Once you release them into the wild their instinct will kick back in, and they will fend for themselves."
Biologist Jaime Peña agrees that the natural beauty of an exotic animal draws the attention of almost anyone, but unless you're a professional it is highly suggested that you don't keep one in your home.
For the cats,
Carole Baskin, CEO of Big Cat Rescue
an Educational Sanctuary home
to more than 100 big cats
12802 Easy Street Tampa, FL 33625
813.493.4564 fax 885.4457
Sign our petition to protect tigers from being farmed here:
This message contains information from Big Cat Rescue that may be
confidential or privileged. The information contained herein is intended
only for the eyes of the individual or entity named above. You are hereby
notified that any dissemination, distribution, disclosure, and/or copying of
the information contained in this communication is strictly prohibited. The
recipient should check this e-mail and any attachments for the presence of
viruses. Big Cat Rescue accepts no liability for any damage or loss caused
by any virus transmitted by this e-mail.
Show Comments (2)

Tar éis tuarascáil rúnda a fháil faoi péire cait mhóra a fheictear i gContae Cameron, shocraigh nuacht Fox 2 treocht nua a iniúchadh a ionsaí go leor tí i ndeisceart Texas. Is domhan é ina bhféadfá teoiric Charles Darwin a chur i bhfeidhm ar mhaireachtáil an duine is oiriúnaí. Le blianta fada, bhí ainmhithe san iomaíocht le daoine le haghaidh bia agus spáis, ach d'fhág ár n-intleacht dúinn a bheith ar an speiceas ceannasach, agus gur spreag an tréith cumhachtach sin daoine chun na créatúir eile go léir a bhaint as a gnáthóga nádúrtha chun iad a chothú.
I gcás cuid acu, ní leor an t-iasc tídeach a bheith acu, mar sin déanann siad trofaí níos mó agus níos fearr a lorg mar chait fiáine agus nathair cheadúla.
Tá cat mór ina siombail cumhachta ó am ársa. Daoine a bhfuil na hacmhainní acu tiogair agus lionsaí a fháil, agus níl sé mídhleathach iad a bheith acu mar pheataí.
D'fhéadfadh siad a bheith suas le 10 míle dollar, a deir an bithéiste Jaime Pena ó Ghléasán Ealaíne Gladys's Porter i Brownsville, Texas. Is é an fhadhb nuair a bhíonn siad ró-mhór nó ionsaitheach daoine a thabhairt iad ar shiúl nó scaoileadh iad amach sa chontae.
Beidh siad ag dul san iomaíocht le haghaidh díon le hainmhithe áitiúla eile cosúil leis an nathair indigo nó nathair bull. Nuair a bhíonn míchothromú ann san éiceachóras bíonn frithghníomh slabhraí ann. Beidh tionchar aige ar gach rud.
Ach an féidir na hainmhithe sin a chur ar ceal as an éiceachóras a chur i gcontúirt? Tá tearmann curtha ar leataobh mar áit shábháilte do go leor speiceas.
Níl ach áiteanna áirithe faoi chosaint ag an rialtas cónaidhme. Anseo ag Páirc Náisiúnta Laguna Atascosa i gContae Cameron tá trí chineál cat fiáine ann. Bhí an bualadh deireanach le jaguar i ndeisceart Texas sna 1950idí i gceantar San Benito.
Is fearr le hainmhithe fiáine maireachtáil i bhfad ó shibhialtacht. Nuair a bhíonn siad gabhadh is féidir leo a bheith ina fhreagracht ollmhór. Tá Barbara Hoffmann, a bhfuil a cuid oibre ag cur i gcrích ag circus, ina úinéir tíogair, léopárd, agus ainmhithe coimhthíocha eile, ach deir sí gurbh é a 20 bliain taithí a lig di aire a thabhairt dá peataí go sábháilte.
Is é an rud atá agam anseo ná saoráid oideachais. Is dócha mura ndéanfaidh mé an seó mór amach sa phobal ní fhágfadh na cait seo a gcliatháin, a bhfuil cead á fháil agam a thógáil anseo i gContae Hidalgo.
D'íocamar cuairt ar rialú ainmhithe i Brownsville chun a fheiceáil an bhfuil ceadúnas ag teastáil chun peataí coimhthíocha a bheith agat, agus deir an t-oifigeach Arturo Martinez nach bhfuil aon cheann ag teastáil, áfach ní mór duit aird chúramach a thabhairt ar ordúcháin na cathrach agus na contae. Mar shampla, toirmeascann ordú i gContae Hidalgo úinéireacht  ainmhithe fiáine contúirteacha . Má tá imní faoi shábháilteacht na n-ainmhithe seo, cá as a bhfaigheann daoine iad?
Fuair muid an mothú gipsy na hÁise. Fuair muid amach freisin éin a bhí daoine ag iarraidh a smughlú isteach, agus d'fhágamar iad ar ais chuig iasc agus fiadhúlra.
Dúirt Eddie Perez, urlabhraí na Custaim agus Cosanta Teorainneacha, go bhfuil hoifigigh na gníomhaireachta an-oilte, ach go bhfuil na smuglaitheoirí i gcónaí ag iarraidh bealaí cruthaitheacha a aimsiú chun ainmhithe a thrasnú.
An bhliain seo chugainn amháin fuair muid sé leanbh tíogair. Glacadh iad ón bhean a bhí ag iarraidh iad a dhíol. Tá ár lions inár mbailiúchán mar chuid de bust drugaí DEA. San am atá caite nuair a bhí jaguars againn, tógadh iad sa Droichead Idirnáisiúnta, bhí daoine ag iarraidh iad a thrasnú ó Mheicsiceo. Léiríonn staitisticí go bhfuil roinnt speiceas ar an mbruach a bheith imithe as an mbeatha ach leanann daoine ag cur as a gnáthóga nádúrtha iad. Ní mhaireann an chuid is mó ach suas le dhá bhliain i ngábhas. Amárach, le linn an dara cuid de mo imscrúdú, a fháil amach má tá an costas a ardú ainmhí coimhthíocha a dhéanann sé go léir fiú.
Níl an costas a bhaineann le hainmhí coimhthíoch a chothú ach cuid de dhliteanas an úinéara. Mar a dúirt muid roimhe seo, ní gá ceadúnas a bheith agat chun ceann a bheith agat, ach tá go leor dlíthe eile ann a d'fhéadfadh tú a fháil san fhadtréimhse. Is iad a n-áilleacht nádúrtha, a ngrá, agus a mistéireach cúiseanna a bhfuil daoine tarraingthe chuig ainmhithe coimhthíocha, agus tá daoine ann a mbíonn an oiread sin spéise acu sna créatúir seo go dteastaíonn uathu mar pheataí.
I Florida, thosaigh roinnt cónaitheoirí ag scaoileadh a gcuid boas peataí isteach sa tsaoirse, agus anois tá siad ag dul san iomaíocht le alligators.
"Le boas, tá siad ag preying ar phobail nach bhfuil ag déanamh go maith de ghnáth, mar gheall ar chailliúint gnáthóg cheana féin".
Níos gaire go dtí an Texas theas, i Matamoros, Tamaulipas Mheicsiceo deimhníodh go bhfuil margadh dubh ann d'ainmhithe coimhthíocha. De ghnáth ceannaíonn baill den aicme éalaigh iad, toisc go bhfuil a bpraghas i raon na mílte dollar. Sna Stáit Aontaithe tá sé go hiomlán dlíthiúil peataí coimhthíocha a bheith agat mar thíogair, leon, dragan uisce, agus nathracha nimhe, ach ní féidir leat iad a thaispeáint nó a dhíol.
Tá Barbara Hoffmann, a bhí ag rith gníomh siorcas taistil ar feadh fiche bliain, ag iarraidh Contae Hidalgo a chur ina luí uirthi a hainmhithe a thaispeáint mar chuid de thaispeántas oideachasúil do leanaí.
"Ní bheidh sé ina shrian ach amháin má chinneann an contae nó an stát srian a chur air nó é a thoirmeasc. Ní chiontaím dóibh nach mian leo mar pheataí. Níl siad ainmhithe peataí cáilíochta. Ní raibh siad riamh agus níor chóir go mbeadh. "
D'fhág Hoffmann Contae Cameron cúpla seachtain ó shin ós rud é nach raibh sí in ann maoin a fháil atá mór go leor dá peataí.
"Le déanaí, dúirt cathair San Benito léi go bhfuil muid ag iarraidh an talamh sin a fhorbairt agus dúradh linn go gcaithfidh sí athlonnú agus rinne sí é, agus chomh fada agus nach raibh aon fhadhbanna aici ar chor ar bith".
Seachas an áit cheart a aimsiú chun ainmhithe móra coimhthíocha a chur i dtithe, is féidir go mbeadh an costas a bhaineann le beatha a thabhairt dóibh go heacnamaíoch.
"Is féidir le cait mhóra feoil a ithe ar luach idir míle agus dhá mhíle dollar gach seachtain".
Sin é an fáth go bhfuil roinnt úinéirí a chur ar an saor in aisce a chruthú seomra do ag teacht i dteagmháil gan iarraidh le ceann de na beasts
"Cinnte gan cur isteach air, go háirithe má tá sé i vein cat mór nó alligator atá i limistéar nach bhféadfadh siad a bheith ann, toisc go bhfuil daoine oilte ann a d'fhéadfadh dul amach agus déileáil leis an staid".
Sa deireadh, an féidir ainmhí coimhthíoch a chothú?
"Tá na ainmhithe fiáine agus beidh siad i gcónaí ainmhithe fiáine. Nuair a scaoiltear iad sa fhiáin, tiocfaidh a n-instinct ar ais, agus déanfaidh siad iad féin a chosaint".
Aontaíonn an bitheolaí Jaime Peña go dtógann áilleacht nádúrtha ainmhí coimhthíocha aird beagnach duine ar bith, ach mura bhfuil tú ina ghairmí moltar go mór nach gcoinníonn tú ceann i do theach.
Do na cait,
Carole Baskin, POF na Cabhrach Mór
teach Tearmann Oideachais
le breis agus 100 cat mór
12802 Easy Street Tampa, FL 33625
813.493.4564 fhas 885.4457
Sínigh ár n-éileamh chun tíogair a chosaint ó bheith á bhfeirmeáil anseo:
Tá faisnéis ó Big Cat Rescue sa teachtaireacht seo a d'fhéadfadh a bheith
rúnda nó príobháideach. Tá an fhaisnéis atá ann anseo beartaithe
Ní bheidh an t-údar nó an t-eintiteas a ainmnítear thuas ag an duine nó ag an eintiteas sin ach amháin. Tá tú ag
fógraíodh go bhfuil aon scaipeadh, dáileadh, nochtadh agus/nó cóipeáil
Tá sé go hiomlán toirmiscthe an fhaisnéis atá sa chumarsáid seo a úsáid. An
Ba cheart don fhaighteoir an ríomhphost seo agus aon naisc a sheiceáil le haghaidh láithreacht
víris. Ní ghlacann Big Cat Rescue aon dliteanas as aon damáiste nó caillteanas a tharla
ag aon víreas a tharchur tríd an ríomhphost seo.
Taispeáin na tuairimí (2)


The series of mitotic cell divisions that a zygote undergoes while passing from the fallopian tubes into the uterus is called as cleavage.
The cleavage is holoblastic because the complete zygote divides.
It takes place as follows:
1st Cleavage: The plane of first mitotic division is vertical and passes through the center of the zygote. It divides the zygote into 2 equal sized cells called blastomeres, each containing equal cytoplasmic volume and chromosome number. First cleavage is prolonged and takes place 30 hours after fertilization.
2nd Cleavage: The plane of cleavage passes at right angle to the first one, thus forming 4 blastomeres. After the cleavage, sometimes one of the blastomeres divides earlier than the second one forming the 3-cell stage. Then, the second blastomere divides forming the 4-celled stage.
3rd Cleavage: The four blastomeres divide to form 8 blastomeres.
4th Cleavage: The 8 blastomeres again divide to form 16 blastomeres. The 16-cell stage is spherical and resembles a mulberry in structure. Hence, it is called as morula.

Tugtar cleavage ar an tsraith de roinnteacht cealla mitótach a bhíonn ag zigot agus é ag dul ó na feadáin fallopian isteach sa uterus.
Tá an cleavage holoblastic toisc go roinntear an zygote iomlán.
Is mar seo a leanas a dhéantar é:
1ú Sceith: Tá pláinéad an chéad roinn mitótach ingearach agus téann sé trí lár an zygote. Roinneann sé an zygote ina 2 chill chomhionann ar a dtugtar blastomers, agus tá an toirteach citéiplasmach agus an líon crómasóim comhionann ag gach ceann acu. Tá an chéad scáileán fada agus tarlaíonn sé 30 uair an chloig tar éis an fhéithithithín a fhéithín.
2ú Sceith: Téann pláinéad an scaithimh ag uillinn cheart leis an gcéad cheann, agus mar sin cruthaítear 4 blastóiméir. Tar éis an cleachtaithe, uaireanta roinntear ceann de na blastomers níos luaithe ná an dara ceann ag cruthú na céime 3-chill. Ansin, roinntear an dara blastóiméir agus foirmítear an chéim 4-chill.
3ú Sceá: Roinneann na ceithre blastóiméir 8 blastóiméir.
4ú Sceitheadh: Déantar na 8 blastóiméir a roinnt arís chun 16 blastóiméir a chruthú. Tá an chéim 16-chill spherical agus is cosúil le mulberry i struchtúr. Dá bhrí sin, tugtar morula air.


POSTGRESQL was originally developed at the University of California at Berkeley. In 1996, a group began development of the database on the Internet. They use email to share ideas and file servers to share code. POSTGRESQL is now comparable to commercial databases in terms of features, performance, and reliability. It has transactions, views, stored procedures, and referential integrity constraints. It supports a large number of programming interfaces, including ODBC, Java (JDBC), TCL/TK, PHP, Perl, and Python. POSTGRESQL continues to improve at a tremendous pace thanks to a talented pool of Internet developers.
There are two aspects of database performance tuning. One is improving the database's use of the CPU, memory, and disk drives in the computer. The second is optimizing the queries sent to the database. This article talks about the hardware aspects of performance tuning. The optimization of queries is done using SQL commands like CREATE INDEX, VACUUM, VACUUM FULL, ANALYZE, CLUSTER, and EXPLAIN. These are discussed in my book, PostgreSQL: Introduction and Concepts at http://momjian.us/main/writings/pgsql/aw_pgsql_book/.
To understand hardware performance issues, it is important to understand what is happening inside the computer. For simplicity, a computer can be thought of as a central processing unit (CPU) surrounded by storage. On the same chip with the CPU are several CPU registers which store intermediate results and various pointers and counters. Surrounding this is the CPU cache which holds the most recently accessed information. Beyond the CPU cache is a large amount of random-access main memory (RAM) which holds executing programs and data. Beyond this main memory are disk drives, which store even larger amounts of information. Disk drives are the only permanent storage area, so anything to be kept when the computer is turned off must be placed there. In summary, here are the storage areas surrounding the CPU:
|Storage Area||Measured in|
You can see that storage areas increase in size as they get farther from the CPU. Ideally, a huge amount of permanent memory could be placed right next to the CPU, but this would be too slow and expensive. In practice, the most frequently used information is stored next to the CPU, and less frequently accessed information is stored farther away and brought to the CPU as needed.
Moving information between various storage areas happens automatically. Compilers determine which information should be stored in registers. CPU chip logic keeps recently used information in the CPU cache. The operating system controls which information is stored in RAM and shuttles it back and forth from the disk drive.
CPU registers and the CPU cache cannot be effectively tuned by the database administrator. Effective database tuning involves increasing the amount of useful information in RAM, thus preventing disk access where possible.
You might think this is easy to do, but it is not. A computer's RAM contains many things:
POSTGRESQL does not directly change information on disk. Instead, it requests data be read into the POSTGRESQL shared buffer cache. POSTGRESQL backends then read/write these blocks, and finally flush them back to disk.
Backends that need to access tables first look for needed blocks in this cache. If they are already there, they can continue processing right away. If not, an operating system request is made to load the blocks. The blocks are loaded either from the kernel disk buffer cache, or from disk. These can be expensive operations.
The default POSTGRESQL configuration allocates 1000 shared buffers. Each buffer is 8 kilobytes. Increasing the number of buffers makes it more likely backends will find the information they need in the cache, thus avoiding an expensive operating system request. The change can be made with a postmaster command-line flag or by changing the value of shared_buffers in postgresql.conf.
You may think, ``I will just give all my RAM to the POSTGRESQL shared buffer cache.'' However, if you do that, there will be no room for the kernel or for any programs to run. The proper size for the POSTGRESQL shared buffer cache is the largest useful size that does not adversely affect other activity.
To understand adverse activity, you need to understand how UNIX operating systems manage memory. If there is enough memory to hold all programs and data, little memory management is required. However, if everything doesn't fit in RAM, the kernel starts forcing memory pages to a disk area called swap. It moves pages that have not been used recently. This operation is called a swap pageout. Pageouts are not a problem because they happen during periods of inactivity. What is bad is when these pages have to be brought back in from swap, meaning an old page that was moved out to swap has to be moved back into RAM. This is called a swap pagein. This is bad because while the page is moved from swap, the program is suspended until the pagein completes.
Pagein activity is shown by system analysis tools like vmstat and sar and indicates there is not enough memory available to function efficiently. Do not confuse swap pageins with ordinary pageins, which may include pages read from the filesystem as part of normal system operation. If you can't find swap pageins, many pageouts is a good indicator you are are also doing swap pageins.
You may wonder why cache size is so important. First, imagine the POSTGRESQL shared buffer cache is large enough to hold an entire table. Repeated sequential scans of the table will require no disk access because all the data is already in the cache. Now imagine the cache is one block smaller than the table. A sequential scan of the table will load all table blocks into the cache until the last one. When that block is needed, the oldest block is removed, which in this case is the first block of the table. When another sequential scan happens, the first block is no longer in the cache, and to load it in, the oldest block is removed, which in this case is now the second block in the table. This pushing out of the next needed block continues to the end of the table. This is an extreme example, but you can see that a decrease of one block can change the efficiency of the cache from 100% to 0%. It shows that finding the right cache size can dramatically affect performance.
Ideally, the POSTGRESQL shared buffer cache will be:
Another tuning parameter is the amount of memory used for sort batches. When sorting large tables or results, POSTGRESQL will sort them in parts, placing intermediate results in temporary files. These files are then merged and resorted until all rows are sorted. Increasing the batch size creates fewer temporary files and often allows faster sorting. However, if the sort batches are too large, they cause pageins because parts of the sort batch get paged out to swap during sorting. In these cases, it is much faster to use smaller sort batches and more temporary files, so again, swap pageins determine when too much memory has been allocated. Keep in mind this parameter is used for every backend performing a sort, either for ORDER BY, CREATE INDEX, or for a merge join. Several simultaneous sorts will use several times this amount of memory.
This value can be changed using a postmaster command-line flag or by changing the value of sort_mem in postgresql.conf.
Both cache size and sort size affect memory usage, so you cannot maximize one without affecting the other. Keep in mind that cache size is allocated on postmaster startup, while sort size varies depending on the number of sorts being performed. Generally, cache size is more significant than sort size. However, certain queries that use ORDER BY, CREATE INDEX, or merge joins may see speedups with larger sort batch sizes.
Also, many operating systems limit how much shared memory can be allocated. Increasing this limit requires operating system-specific knowledge to either recompile or reconfigure the kernel. More information can be found in the POSTGRESQL administrators guide, http://developer.postgresql.org/docs/postgres/kernel-resources.html.
As a start for tuning, use 15% of RAM for cache size, and 2-4% for sort size if you have just a few big sessions, and much smaller if you have lots of small sessions. You can try increasing it to see if performance improves and if no swapping occurs. If the shared buffers are oversized, you waste overhead maintaining too many buffers, and it takes RAM that could be used by other processes and as additional kernel disk buffer cache.
A valuable server parameter is effective_cache_size. This parameter is used by the optimizer to estimate the size of the kernel's disk buffer cache. In kernels with a unified buffer cache, this value should be set to the average amount of unused RAM in the kernel because such kernels use unused RAM to cache recently accessed disk pages. On kernels with a fixed-sized disk buffer cache, this should be set to the size of your kernel buffer cache, typically 10% of RAM.
The physical nature of disk drives makes their performance characteristics different from the other storage areas mentioned in this article. The other storage areas can access any byte with equal speed. Disk drives, with their spinning platters and moving heads, access data near the head's current position much faster than data farther away.
Moving the disk head to another cylinder on the platter takes quite a bit of time. Unix kernel developers know this. When storing a large file on disk, they try to place the pieces of the file near each other. For example, suppose a file requires ten blocks on disk. The operating system may place blocks 1-5 on one cylinder and blocks 6-10 on another cylinder. If the file is read from beginning to end, only two head movements are required -- one to get to the cylinder holding blocks 1-5, and another to get to blocks 6-10. However, if the file is read non-sequentially, e.g. blocks 1,6,2,7,3,8,4,9,5,10; ten head movements are required. As you can see, with disks, sequential access is much faster than random access. This is why POSTGRESQL prefers sequential scans to index scans if a significant portion of the table needs to be read. This also highlights the value of the cache.
The disk head moves around quite a bit during database activity. If too many read/write requests are made, the drive can become saturated, causing poor performance. (Vmstat and sar can provide information on the amount of activity on each disk drive.)
One solution to disk saturation is to move some of the POSTGRESQL data files to other disks. Remember, moving the files to other filesystems on the same disk drive does not help. All filesystems on a drive use the same disk heads.
Database access can be spread across disk drives in several ways:
Modern disk drives have both a read and write cache. The read cache keeps recently requested disk blocks available in disk memory. The write cache holds write requests until they can efficiently be stored on the disk platters. You might relialize this could be a problem -- what if the drive loses power while it is holding write data that hasn't yet been written to the disk platters? Some disk drives, and RAID controllers, have a battery-backed write cache that keeps the data safe and writes it to the disk platters when full power is restored. However, most drives do not have this feature, and are therefore unreliable.
Fortunately, you can turn off the write cache in most drives. SCSI drives typically have the write cache turned off. IDE drives usually have the write cache turned on, but can be turne off with an operating system command link hdparm -W0, sysctl hw.ata.wc = 0, or scsicmd. However, some IDE drives will report that their write cache is turned off, but still use it and remain unreliable. It is difficult to fine out which drives are lying without extensive testing.
Because PostgreSQL writes the write-ahead log to disk on every transaction commit using fsync(), and waits for that write to complete, users will see a huge performance boost if a write cache is used. Therefore, for performance and reliability, it is ideal if PostgreSQL can use a battery-backed write cache.
SCSI drives are usually significantly more expensive than IDE drives. SCSI drives have a protocol that is used to communicate with the controller and operating system, while IDE drives are much simpler and can accept only a single request at a time. SCSI drives with tagged queueing can accept multiple requests and can reorder them to improve efficiency. This is why SCSI and IDE disks have similar performance characteristics for single-user or single-file I/O operations, but scsi performance is much better than IDE when the requests are generated by multiple users or processes. For this reason, SCSI is preferred for heavily-used database servers.
In fact, SCSI or IDE is only one way to generally distinguish between the two major types of drives -- enterprise drives, which are designed for high performance and reliability, and personal computer drives, which are designed to minimize cost. This paper, http://www.seagate.com/content/docs/pdf/whitepaper/D2c_More_than_Interface_ATA_vs_SCSI_042003.pdf, does an excellent job of describing the tradeoffs in producing drives based on performance/reliability or reduced cost. It is an excellent guide in choosing drives based on their features.
Some operating systems support multiple disk file systems. In such cases, it can be difficult to know which file system performs best. POSTGRESQL usually performs best on traditional Unix file systems like the BSD UFS/FFS filesystems, which many operating systems support. The default 8K block size of UFS is the same as POSTGRESQL's page size. You can run on journal and log-based file systems, but these cause extra overhead during fsync's of the write-ahead log. Older SvR3-based file systems become too fragmented to yield good performance.
File system choice is particularly difficult on Linux because there are so many file system choices, and none of them are optimal: ext2 is not entirely crash-safe, ext3, XFS, and JFS are journal-based, and Reiser is optimized for small files and does journalling. The journalling file systems can be significantly slower than ext2 but when crash recovery is required, ext2 isn't an option. If ext2 must be used, mount it with sync enabled. Some people recommend an ext3 filesystem mounted with data=writeback.
NFS and other remote file systems are not recommended for use by POSTGRESQL. NFS does not have the same file system semantics as a local file system, and these inconsistencies can cause data reliability or crash recovery problems.
POSTGRESQL uses a multi-process model, meaning each database connection has its own Unix process. Because of this, all multi-cpu operating systems can spread multiple database connections among the available CPUs. However, if only a single database connection is active, it can only use one CPU. POSTGRESQL does not use multi-threading to allow a single process to use multiple CPUs.
When write-ahead log files fill up, a checkpoint is performed to force all dirty buffers to disk so the log file can be recycled Checkpoints are also performed automatically at certain intervals, usually every 5 minutes. If there is a lot of database write activity, the write-ahead log segments can fill too quickly, causing excessive slowness as all dirty disk buffers are flushed to disk.
Checkpoints should happen every few minutes. If they happen several times a minute, performance will suffer. To determine if you are checkpointing too frequently, look in your server logs for a message emitted by checkpoint_warning. This message is emitted if you checkpoint more than once in a 30 second period.
Reducing checkpoint frequency involves increasing the number of write-ahead log files created in data/pg_xlog. Each file is 16 megabytes, so this does affect disk usage. The default setup uses a minimum number of log files. To decrease checkpoint frequency, you need to increase this parameter:
Fortunately, POSTGRESQL doesn't require much tuning. Most parameters are automatically adjusted to maintain optimum performance. Cache size and sort size are two parameters administrators can control to make better user of available memory. Disk access can also be spread across drives. Other parameters may be set in share/postgresql.conf.sample. You can copy this file to data/postgresql.conf to experiment with some of POSTGRESQL's even more exotic parameters.

Forbraíodh POSTGRESQL ar dtús in Ollscoil California i Berkeley. I 1996, thosaigh grúpa ag forbairt an bhunachar sonraí ar an Idirlíon. Úsáideann siad ríomhphost chun smaointe a roinnt agus freastalaithe comhad chun cód a roinnt. Tá POSTGRESQL anois inchomparáide le bunachair sonraí tráchtála ó thaobh gnéithe, feidhmíochta agus iontaofachta de. Tá idirbhearta, radharcanna, nósanna imeachta stóráilte, agus srianta sláine tagarthacha aige. Tacaíonn sé le líon mór comhéadan cláir, lena n-áirítear ODBC, Java (JDBC), TCL / TK, PHP, Perl, agus Python. Tá an t-eagarthóir ar an idirlíon, POSTGRESQL, ag feabhsú go tapa, a bhuíochas le grúpa de shaineolaithe Internet a bhfuil cumas acu.
Tá dhá ghné de fheidhmíocht bunachar sonraí a chur in oiriúint. Tá ceann acu ag feabhsú úsáid an bhunachar sonraí as an CPU, an chuimhne agus na tiománaí diosca sa ríomhaire. Is é an dara ceann na ceisteanna a sheoltar chuig an mbunachar sonraí a bharrfheabhsú. Labhraíonn an t-alt seo faoi ghnéithe crua-earraí an t-uasghrádú feidhmíochta. Déantar an barrfheabhsú ar cheisteanna trí orduithe SQL a úsáid mar CREATE INDEX, VACUUM, VACUUM FULL, ANALYZE, CLUSTER, agus EXPLAIN. Pléitear iad seo i mo leabhar, PostgreSQL: Tús agus Coinníoll ag http://momjian.us/main/writings/pgsql/aw_pgsql_book/.
Chun saincheisteanna feidhmíochta crua-earraí a thuiscint, tá sé tábhachtach a thuiscint cad atá ag tarlú taobh istigh den ríomhaire. Chun a shimpliú, is féidir ríomhaire a shamhlú mar aonad próiseála lárnach (CPU) atá timpeallaithe ag stóráil. Ar an bpíosa céanna leis an bpróiseálaí tá roinnt cláraitheoirí próiseála a stórálann torthaí idirmheánacha agus pointeoirí agus cuntadóirí éagsúla. Tá an cache CPU timpeall air a shealbhaíonn an fhaisnéis is déanaí a rochtain. Taobh amuigh den chách CPU tá méid mór de phríomhchuimhne rochtana randamach (RAM) a shealbhaíonn cláir agus sonraí a fheidhmíonn. Taobh amuigh den phríomhchuimhne seo tá tiománaí diosca, a stórálann méideanna níos mó faisnéise. Is iad tiománaí diosca an t-aon spás stórála buan, mar sin ní mór aon rud a choimeád nuair a bhíonn an ríomhaire as a bheith, a chur ann. Go hachomair, seo na limistéir stórála a bhaineann leis an bpróiseas:
Tá an limistéar stórála measartha i
Is féidir leat a fheiceáil go méadaíonn limistéir stórála i méid mar a fhaigheann siad níos faide ón CPU. Go hidéalach, d'fhéadfaí méid ollmhór cuimhne buan a chur díreach in aice leis an CPU, ach bheadh sé seo ró-mhall agus ró-chostasach. I gcleachtas, stóráiltear an fhaisnéis is minice a úsáidtear in aice leis an CPU, agus stóráiltear faisnéis a bhfuil rochtain níos lú orthu i bhfad níos faide agus tugtar chuig an CPU é de réir mar is gá.
Tarlaíonn faisnéis a bhogadh idir limistéir stórála éagsúla go huathoibríoch. Cinntíonn comhlánaithe cén fhaisnéis ba cheart a stóráil i gclár. Coinníonn loighic sliseanna CPU faisnéis a úsáideadh le déanaí i gcáche CPU. Déanann an córas oibriúcháin rialú ar an bhfaisnéis a stóráiltear sa RAM agus a aistriú ar ais agus ar aghaidh ón tiomáint diosca.
Ní féidir le riarthóir an bhunachar sonraí clárú go héifeachtach ar chlárúcháin CPU agus ar chách CPU. Baineann sé le tuning bunachar sonraí éifeachtach méid na faisnéise úsáideach i RAM a mhéadú, rud a chosnaíonn rochtain ar an diosca nuair is féidir.
B'fhéidir go gceapann tú go bhfuil sé éasca é seo a dhéanamh, ach ní hé. Tá go leor rudaí i RAM ríomhaire:
Ní athraíonn POSTGRESQL faisnéis ar chlé go díreach. Ina áit sin, iarrann sé go léitear sonraí isteach i gcách buiféir roinnte POSTGRESQL. Ansin léann / scríobhann cúlchistí POSTGRESQL na bloic seo, agus ar deireadh cuireann siad ar ais iad ar an diosca.
Ba chóir do chúlchríochna a bhfuil gá acu le táblaí a rochtain a lorg ar dtús chun na bloic is gá a fháil sa chách. Má tá siad ann cheana féin, is féidir leo leanúint ar aghaidh ag próiseáil láithreach. Mura bhfuil, déantar iarraidh ar an gcóras oibriúcháin chun na bloic a uaslódáil. Luchtaítear na bloic ó chách clúdach an chléir nó ó chléir. Is féidir go mbeadh na hoibríochtaí seo daor.
Déanann an chumraíocht réamhshocraithe POSTGRESQL 1000 buiféar roinnte a leithdháileadh. Tá 8 kilobytes ag gach buffer. Má méadaítear líon na mbúiféirí, is dóichí go bhfaighidh cúlchláir an fhaisnéis a theastaíonn uathu sa chách, agus go seachnófar d'iarratas costasach ar chóras oibriúcháin. Is féidir an t-athrú a dhéanamh le bratach líne ordaithe postmaster nó trí luach shared_buffers a athrú in postgresql.conf.
B'fhéidir go gceapann tú, 'Ní dhéanfaidh mé ach mo RAM go léir a thabhairt do chách buffer roinnte POSTGRESQL.' Mar sin féin, má dhéanann tú sin, ní bheidh aon spás ann don chernel ná do chlár ar bith a reáchtáil. Is é an méid is fearr le haghaidh an cháis buiféir roinnte POSTGRESQL an méid úsáideach is mó nach ndéanann difear do ghníomhaíocht eile.
Chun tuiscint a fháil ar ghníomhaíocht dhiúltacha, ní mór duit tuiscint a fháil ar an gcaoi a bhainistiú córais oibriúcháin UNIX cuimhne. Má tá go leor cuimhne ann chun na cláir agus na sonraí go léir a choinneáil, ní gá go leor bainistíochta cuimhne. Mar sin féin, mura bhfuil gach rud oiriúnach sa RAM, tosaíonn an núicléach leathanaigh chuimhne a fhorchur chuig limistéar diosca ar a dtugtar malartú. Bogann sé leathanaigh nach ndearnadh úsáid orthu le déanaí. Tugtar páipéar amach a mhalartú ar an oibríocht seo. Ní fadhb iad na páig-outs toisc go dtarlaíonn siad le linn tréimhsí neamhghníomhaíochta. Is é an rud atá dona ná nuair a chaithfear na leathanaigh seo a thabhairt ar ais ó mhalartú, rud a chiallaíonn go gcaithfear leathanach sean a aistríodh amach go malartú a aistriú ar ais go RAM. Tugtar páipéar malairte air seo. Tá sé seo dona toisc go bhfuil an clár ar fionraí go dtí go mbeidh an leathanachin críochnaithe nuair a bhogfar an leathanach ó swap.
Taispeánann uirlisí anailíse córais mar vmstat agus sar gníomhaíocht leathanach agus léiríonn sé nach bhfuil go leor cuimhne ar fáil chun feidhmiú go héifeachtach. Ná déan mícheart idir leathanaigh mhalartú agus leathanaigh ghinearálta, a d'fhéadfadh leathanaigh a léamh ón gcóras comhaid a bheith mar chuid d'oibriú gnáthchórais. Mura féidir leat leathanachanna malartacha a aimsiú, is táscaire maith é go bhfuil go leor leathanachanna malartacha á dhéanamh agat freisin.
B'fhéidir go n-imreoidh tú cén fáth go bhfuil méid an cháis chomh tábhachtach. Ar dtús, samhlaigh go bhfuil an cache buiféir roinnte POSTGRESQL mór go leor chun tábla iomlán a shealbhú. Ní gá rochtain diosca a bheith ag scanadh athfhillteach na tábla mar go bhfuil na sonraí go léir sa chách cheana féin. Anois samhlaigh go bhfuil an clúdach beag níos lú ná an tábla. Cuirfidh scanadh seicheamhúil an tábla gach bloc tábla isteach sa chách go dtí an ceann deireanach. Nuair a bhíonn gá leis an mbloc sin, baintear an bloc is sine as, ar an gcéad bhloc den tábla é sa chás seo. Nuair a tharlaíonn scanadh seicheamh eile, níl an chéad bhloc sa chách níos mó, agus chun é a luí isteach, baintear an bloc is sine as, atá sa chás seo anois mar an dara bloc sa tábla. Leanann an brú amach as an chéad bhloc eile a theastaíonn go dtí deireadh an tábla. Is sampla iomarcach é seo, ach is féidir leat a fheiceáil go bhféadfadh laghdú amháin de bhloc éifeachtúlacht an cháis a athrú ó 100% go 0%. Léiríonn sé gur féidir le méid ceart an cháis a aimsiú tionchar suntasach a imirt ar fheidhmíocht.
Go hidéalach, beidh an POSTGRESQL comhroinnte buffer cache a bheith:
Is é paraméadar cothaithe eile an méid cuimhne a úsáidtear le haghaidh baisc sortaithe. Nuair a bhíonn táblaí móra nó torthaí á rangú, déanfaidh POSTGRESQL iad a rangú i gcodanna, ag cur torthaí eatramhacha i gcomhaid shealadacha. Déantar na comhaid seo a chomhcheangal agus a úsáid go dtí go ndéantar na línte go léir a sheiceáil. Trí mhéid an bhaisc a mhéadú, cruthaítear níos lú comhaid shealadacha agus is minic a chuirtear in ann iad a rangú níos tapúla. Mar sin féin, má tá na baisc de chineál ró-mhór, bíonn siad ina gcúis le pageins toisc go bhfaigheann codanna den bhaisc de chineál páipéireacht chun malartú le linn an tsortála. Sna cásanna seo, tá sé i bhfad níos tapúla baisc sortaithe níos lú agus níos mó comhaid shealadacha a úsáid, mar sin arís, socraíonn leathanachí malairte nuair a leithdháiltear an iomarca cuimhne. Coinnigh i gcuimhne go n-úsáidtear an paraiméadar seo le haghaidh gach cúlchríoch a dhéanann cineál, cibé acu le haghaidh ORDER BY, CREATE INDEX, nó le haghaidh a chur le chéile. Úsáidfidh roinnt cineálacha comhuaineacha roinnt uaireanta an méid cuimhne seo.
Is féidir an luach seo a athrú trí phlainc líne ordaithe postmaster a úsáid nó trí luach sort_mem a athrú in postgresql.conf.
Bíonn tionchar ag méid an cháis agus méid an tsortú araon ar úsáid chuimhne, mar sin ní féidir leat ceann a uasmhéadú gan tionchar a bheith ag an gceann eile. Coinnigh i gcuimhne go ndéantar méid an cháis a leithdháileadh ar thosú postmháistir, agus go n-athraíonn méid an tsórtála ag brath ar líon na tsórtála atá á dhéanamh. Go ginearálta, tá méid an cháis níos suntasaí ná méid an tsórtála. Mar sin féin, d'fhéadfadh go bhfeicfeadh iarratais áirithe a úsáideann ORDER BY, CREATE INDEX, nó comhcheangail luasghéarú le méideanna baisc sortaithe níos mó.
Chomh maith leis sin, tá teorainn le go leor córais oibriúcháin ar an méid cuimhne a fhéadfar a leithdháileadh. Chun an teorainn seo a mhéadú, teastaíonn eolas sonrach ó chóras oibriúcháin chun an núicléas a athchomhdhéanamh nó a athchomhshocrú. Is féidir tuilleadh faisnéise a fháil sa treoirleabhar riarthóirí POSTGRESQL, http://developer.postgresql.org/docs/postgres/kernel-resources.html.
Mar thús le haghaidh tuning, bain úsáid as 15% de RAM le haghaidh méid an cháis, agus 2-4% le haghaidh méid an tsórtála má tá cúpla seisiún mór agat, agus i bhfad níos lú má tá go leor seisiún beag agat. Is féidir leat é a mhéadú chun a fheiceáil an bhfeabhsaíonn feidhmíocht agus an tharlaíonn aon mhalartú. Má tá na buiféirí roinnte ró-mhéide, caillfidh tú ró-chostas ag cothabháil ró-chuid buiféirí, agus glacann sé RAM a d'fhéadfadh próisis eile a úsáid agus mar chách buiféir breise diosca núicléach.
Is é paraméadar freastalaí luachmhar effective_cache_size. Baineann an t-uasfheisteoir úsáid as an paraiméadar seo chun meáchan cache buffer diosca an chernel a mheas. I gcúiseanna le clúdach buffer aontaithe, ba cheart an luach seo a shocrú ar mheánmhéid RAM neamhúsáidte sa chúis toisc go n-úsáideann na cúiseanna sin RAM neamhúsáidte chun leathanaigh diosca a bhfuil rochtain orthu le déanaí a chlúdach. Ar chernels le cache buffer diosca de mhéid seasta, ba cheart é seo a shocrú go méid do cache buffer chernel, de ghnáth 10% de RAM.
Tá na tréithe feidhmíochta atá ag tiománaí diosca difriúil ó na háiteanna stórála eile a luaitear san alt seo de bharr nádúr fisiciúil na n-earraí tiomána diosca. Is féidir leis na limistéir stórála eile rochtain a fháil ar aon bhait le luas comhionann. Tá tiománaí diosca, lena n-plátaí rothlacha agus a gcinníní ag gluaiseacht, ag rochtain ar shonraí in aice le suíomh reatha an chinn i bhfad níos gasta ná sonraí níos faide i gcéin.
Tógann sé tamall go leor chun ceann an diosca a aistriú chuig sorcóir eile ar an pláta. Tá a fhios ag forbróirí núicléis Unix é seo. Nuair a stóráil comhad mór ar diosca, iarracht siad a chur ar na píosaí den chomhad in aice le chéile. Mar shampla, má tá gá le comhad deich mbloc ar an diosca. Féadfaidh an córas oibriúcháin bloic 1-5 a chur ar chillindéar amháin agus bloic 6-10 ar chillindéar eile. Má léitear an comhad ó thús go deireadh, ní gá ach dhá ghluaiseacht cheann - ceann chun teacht ar an sorcóir a shealbhaíonn bloic 1-5, agus ceann eile chun teacht ar bloic 6-10. Mar sin féin, má léitear an comhad go neamh-iarsmaí, e.g. Bloic 1,6,2,7,3,8,4,9,5,10; ní mór deich gluaiseacht ceann a dhéanamh. Mar a fheiceann tú, le dioscaí, rochtain seicniúil i bhfad níos tapúla ná rochtain randamach. Sin é an fáth go dtugann POSTGRESQL tosaíocht do scanadh seicheamhnach ná do scanadh innéacs má theastaíonn cuid shuntasach den tábla a léamh. Cuireann sé seo béim freisin ar luach an chárta.
Bogann ceann an diosca timpeall go leor le linn gníomhaíochta bunachar sonraí. Má dhéantar an iomarca iarratais léitheoireachta / scríbhneoireachta, d'fhéadfadh an tiomáint a bheith líonta, rud a d'fhéadfadh drochfheidhmíocht a chur faoi deara. (Is féidir le VMstat agus SAR faisnéis a sholáthar maidir le méid na gníomhaíochta ar gach tiomáint diosca.)
Is é réiteach amháin ar shásamh diosca cuid de na comhaid sonraí POSTGRESQL a bhogadh go dioscaí eile. Cuimhnigh, ní chabhraíonn sé na comhaid a aistriú chuig córais comhaid eile ar an tiomáint diosca céanna. Úsáideann gach córas comhaid ar thiomáint na cinn diosca céanna.
Is féidir rochtain ar bhunachar sonraí a scaipeadh ar feadh tiománaí diosca ar roinnt bealaí:
Tá clúdach léitheoireachta agus scríbhneoireachta araon ag tiománaí diosca nua-aimseartha. Coinníonn an clúdach léitheoireachta bloic diosca a iarradh le déanaí ar fáil i gcuimhne diosca. Coinníonn an clúdach scríbhneoireachta iarratais scríbhneoireachta go dtí go bhféadfar iad a stóráil go héifeachtach ar na plátaí diosca. D'fhéadfadh tú a realised d'fhéadfadh sé seo a bheith ina fhadhb - cad a tharlaíonn má chailleann an tiomáint chumhacht cé go bhfuil sé ag coinneáil sonraí scríbhneoireachta nach bhfuil scríofa go fóill ar na plátaí diosca? Tá clúdach scríbhneoireachta cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cúltaca cónc Mar sin féin, níl an ghné seo ag formhór na drifte, agus dá bhrí sin níl siad iontaofa.
Ar an dea-uair, is féidir leat an cache scríbhneoireachta a mhúchadh i bhformhór na n-earraí. De ghnáth bíonn an cache scríbhneoireachta as feidhm ag tiománaí SCSI. De ghnáth bíonn an cache scríbhneoireachta ar thiomáint IDE, ach is féidir é a thiontú le nasc ordaithe córas oibriúcháin hdparm -W0, sysctl hw.ata.wc = 0, nó scsicmd. Mar sin féin, tuairiscíonn roinnt tiománaithe IDE go bhfuil a gcáche scríbhneoireachta as a bheith, ach úsáideann siad é fós agus fanann siad neamh-iontaofa. Tá sé deacair a fháil amach cé na tiománaithe atá bréagach gan tástáil chuimsitheach.
Toisc go scríobhann PostgreSQL an log scríbhneoireachta ar aghaidh chuig diosca ar gach comhlíonadh idirbhirt ag baint úsáide as fsync (), agus go mbíonn sé ag fanacht go gcuirfear an scríbhneoireacht sin i gcrích, feicfidh úsáideoirí borradh mór feidhmíochta má úsáidtear clúdach scríbhneoireachta. Dá bhrí sin, le haghaidh feidhmíochta agus iontaofachta, is iontach má fhéadann PostgreSQL cache scríbhneoireachta cúltaca cadhnraí a úsáid.
De ghnáth bíonn tiománaí SCSI i bhfad níos costasaí ná tiománaí IDE. Tá prótacal ag tiománaithe SCSI a úsáidtear chun cumarsáid a dhéanamh leis an rialaitheoir agus leis an gcóras oibriúcháin, agus tá tiománaithe IDE i bhfad níos simplí agus ní féidir leo ach iarratas amháin a ghlacadh ag an am. Is féidir le tiománaí SCSI le cuí tagáilte glacadh le hiarratais iolracha agus is féidir iad a athordú chun éifeachtúlacht a fheabhsú. Sin an fáth go bhfuil tréithe feidhmíochta den chineál céanna ag dioscaí SCSI agus IDE le haghaidh oibríochtaí I/O aon-úsáideora nó aon-chlár, ach tá feidhmíocht scsi i bhfad níos fearr ná IDE nuair a ghineann na hiarrataí trí ilúsáideoirí nó próisis. Ar an gcúis seo, is fearr SCSI le haghaidh freastalaithe bunachar sonraí a úsáidtear go mór.
Go deimhin, níl i SCSI ná IDE ach bealach amháin chun idirdhealú a dhéanamh idir an dá phríomhchineál tiománaí - tiománaí fiontraíochta, atá deartha le haghaidh ardfheidhmíochta agus iontaofachta, agus tiománaí ríomhaire pearsanta, atá deartha chun costas a íoslaghdú. Déanann an páipéar seo, http://www.seagate.com/content/docs/pdf/whitepaper/D2c_More_than_Interface_ATA_vs_SCSI_042003.pdf, post den scoth chun cur síos a dhéanamh ar na comhréiteachanna i dtáirgeadh tiománaí bunaithe ar fheidhmíocht/iontaofacht nó ar chostas laghdaithe. Is treoir iontach é chun tiománaí a roghnú bunaithe ar a gcuid gnéithe.
Tacaíonn roinnt córais oibriúcháin le córais comhaid diosca il. I gcásanna den sórt sin, d'fhéadfadh sé a bheith deacair a fháil amach cén córas comhaid a fheidhmíonn is fearr. De ghnáth, is fearr feidhmíocht POSTGRESQL ar chórais comhaid Unix traidisiúnta cosúil le córais comhaid BSD UFS / FFS, a thacaíonn go leor córais oibriúcháin leo. Is é an méid bloc 8K réamhshocraithe de UFS an méid leathanach POSTGRESQL céanna. Is féidir leat rith ar chórais comhaid atá bunaithe ar iris agus ar log, ach bíonn ró-uaire breise ag na córais seo le linn fsync an log scríbhneoireachta. Tá na córais fhaidhle atá bunaithe ar an SvR3 níos sine ró-chraobháilte chun feidhmíocht mhaith a thabhairt.
Tá rogha córais comhaid deacair go háirithe ar Linux toisc go bhfuil an oiread sin roghanna córais comhaid ann, agus níl aon cheann acu is fearr: níl ext2 go hiomlán sábháilte ó chraos, tá ext3, XFS, agus JFS bunaithe ar iris, agus tá Reiser oiriúnach do chomhaid bheaga agus déanann sé iris. Is féidir leis na córais comhaid leabharlainne a bheith i bhfad níos moille ná ext2 ach nuair a theastaíonn aisghabháil timpiste, níl ext2 ina rogha. Más gá ext2 a úsáid, é a chur le chéile le sioncróiriú cumasaithe. Molann daoine áirithe córas comhaid ext3 a bheith suiteáilte le data=writeback.
Ní mholtar NFS agus córais chomhad iargúlta eile a úsáid ag POSTGRESQL. Níl an séamantachta córais comhaid chéanna ag NFS le córas comhaid áitiúil, agus d'fhéadfadh fadhbanna iontaofachta sonraí nó aisghabhála timpiste a bheith mar thoradh ar na neamhréireachtaí seo.
Úsáideann POSTGRESQL samhail ilphróiseas, rud a chiallaíonn go bhfuil a phróiseas Unix féin ag gach nasc bunachar sonraí. Mar gheall air seo, is féidir le gach córas oibriúcháin il-CPU nasc bunachar sonraí iolra a scaipeadh i measc na n-CPUanna atá ar fáil. Mar sin féin, má tá nasc bunachar sonraí amháin gníomhach, ní féidir leis ach CPU amháin a úsáid. Ní úsáideann POSTGRESQL il-threading chun ligean do phróiseas aonair úsáid a bhaint as il-CPUanna.
Nuair a líonadh comhaid lógó scríbhneoireachta ar aghaidh, déantar seiceáil chun na buiféirí salacha go léir a chur ar an diosca ionas gur féidir an comhad lógó a athchúrsáil Déantar seiceálacha go huathoibríoch ag eatraimh áirithe, de ghnáth gach 5 nóiméad. Má tá go leor gníomhaíochta scríbhneoireachta bunachar sonraí ann, is féidir leis na codanna lógó scríbhneoireachta ar aghaidh a líonadh ró-tapa, rud a fhágann go bhfuil moill iomarcach mar go ndéantar gach buffer diosca salach a shlánú chuig diosca.
Ba chóir go mbeadh seiceálacha ar siúl gach cúpla nóiméad. Má tharlaíonn siad go minic in aghaidh an nóiméid, beidh pian ar an fheidhmíocht. Chun a chinneadh an bhfuil tú ag seiceáil ró-mhinicíochta, féach i do chuid loganna freastalaí ar feadh teachtaireacht a eisíodh ag checkpoint_warning. Seoltar an teachtaireacht seo má dhéanann tú an t-ábhar seiceála níos mó ná uair amháin i dtréimhse 30 soicind.
Is éard atá i gceist le minicíocht na bpointí seiceála a laghdú ná líon na gcomhad lógó scríbhneoireachta a cruthaítear i data/pg_xlog a mhéadú. Tá 16 meigabait ag gach comhad, mar sin bíonn tionchar ag an méid a úsáidtear ar an diosca. Úsáidtear líon íosta comhaid lógó sa shuiteáil réamhshocraithe. Chun minicíocht na bpointí seiceála a laghdú, ní mór duit an paraiméadar seo a mhéadú:
Ar an dea-uair, ní gá go leor tuning a dhéanamh ar POSTGRESQL. Déantar an chuid is mó de na paraiméadair a choigeartú go huathoibríoch chun feidhmíocht is fearr a choinneáil. Tá méid an cháis agus méid an tsórtála dhá pharaiméadar is féidir le riarthóirí a rialú chun úsáideoir níos fearr a dhéanamh den chuimhne atá ar fáil. Is féidir rochtain ar an diosca a scaipeadh ar fud tiománaí freisin. Is féidir paraiméadair eile a shocrú i share/postgresql.conf.sample. Is féidir leat an comhad seo a chóipeáil chuig data/postgresql.conf chun triail a bhaint as cuid de na paraiméadair níos exotic fós de POSTGRESQL.