scieee Open visual document viewer

How to correctly simulate memory allocation behavior of applications by calibrating main memory stubs

Trapp, Peter,Meyer, Markus,Facchi, Christian

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

T app, Pe e ; Meye , Ma kus; Facchi, Ch is ian Wo king Pape How o co ec ly simula e memo y alloca ion beha io o applica ions by calib a ing main memo y s ubs A bei sbe ich e - Wo king Pape s, No. 20 P o ided in Coope a ion wi h: Technische Hochschule Ingols ad (THI) Sugges ed Ci a ion: T app, Pe e ; Meye , Ma kus; Facchi, Ch is ian (2011) : How o co ec ly simula e memo y alloca ion beha io o applica ions by calib a ing main memo y s ubs, A bei sbe ich e - Wo king Pape s, No. 20, Hochschule Ingols ad - Uni e si y o Applied Sciences, Ingols ad , h ps://nbn- esol ing.de/u n:nbn:de:b b:573-360 This Ve sion is a ailable a : h ps://hdl.handle.ne /10419/202572 S anda d-Nu zungsbedingungen: Die Dokumen e au EconS o dü en zu eigenen wissenscha lichen Zwecken und zum P i a geb auch gespeiche und kopie we den. Sie dü en die Dokumen e nich ü ö en liche ode komme zielle Zwecke e iel äl igen, ö en lich auss ellen, ö en lich zugänglich machen, e eiben ode ande wei ig nu zen. So e n die Ve asse die Dokumen e un e Open-Con en -Lizenzen (insbesonde e CC-Lizenzen) zu Ve ügung ges ell haben soll en, gel en abweichend on diesen Nu zungsbedingungen die in de do genann en Lizenz gewäh en Nu zungs ech e. Te ms o use: Documen s in EconS o may be sa ed and copied o you pe sonal and schola ly pu poses. You a e no o copy documen s o public o comme cial pu poses, o exhibi he documen s publicly, o make hem publicly a ailable on he in e ne , o o dis ibu e o o he wise use he documen s in public. I he documen s ha e been made a ailable unde an Open Con en Licence (especially C ea i e Commons Licences), you may exe cise u he usage igh s as speci ied in he indica ed licence. h ps://c ea i ecommons.o g/licenses/by-nc-nd/3.0/de/ Wo king Pape s A bei sbe ich e How o Co ec ly Simula e Memo y Alloca ion Beha io o Applica ions by Calib a ing Main Memo y S ubs Pe e T app, Ma kus Meye and Ch is ian Facchi How o Co ec ly Simula e Memo y Alloca ion Beha io o Applica ions by Calib a ing Main Memo y S ubs Pe e T app, Ma kus Meye , and Ch is ian Facchi Uni e si y o Applied Sciences Ingols ad Ingols ad , Ge many { app,meye ma, acchi}@haw-ingols ad .de Ma ch 2011 Abs ac Dynamic pe o mance s ubs p o ide a amewo k o simula e he pe o mance beha io o so wa e modules and unc ions. Hence, hey can be used as an ex ension o so wa e pe o mance enginee ing me hodologies. The me hodology o dynamic pe o mance s ubs a - ge s o gain o ien ed pe o mance imp o emen . O he applica ions include he iden i ica ion o “hidden” bo lenecks and he p io i i- za ion o op imiza ion al e na i es. Main memo y s ubs ha e been de eloped o ex end he simula ion possibili ies o he dynamic pe - o mance s ubs amewo k. They a e able o simula e he heap and s ack beha io o so wa e modules o unc ions. This pape ex ends and imp o es he simula ion algo i hm o be able o simula e cons an s ack alues. Mo eo e , i p esen s calib a ion possibili ies o imp o e he simula ion esul s by de e mining he a ious o e head in he al- go i hm. The esul s a e u he mo e used o compensa e inaccu acies in he simula ion. Addi ionally, a p oo o concep is gi en as alida- ion o he esul s. This pape shows ha , main memo y s ubs can be used o simula e he heap, s ack and iming beha io exac ly when conside ing he pa ame e s de e mined by he calib a ion unc ions. Keywo ds:Memo y Sys ems; So wa e Pe o mance, E alua ion and Tes ing; Modeling; Pe o mance Op imiza ion, Bounds, and Models; Case S udies 1 1 In oduc ion Dynamic pe o mance s ubs ha e been in oduced in [1]. They can be used o he de ec ion o “hidden” bo lenecks. By demons a ing he op imiza ion po en ial o he de ec ed bo leneck a cos -bene i analysis can be pe o med, leading o a gain-o ien ed app oach o pe o mance op imiza ions. In he pas , pe o mance inc eases in many sys em a chi ec u es ha e been achie ed by highe CPU speeds, and mo e ecen ly, by using mul iple co es. Ye , he memo y speed and, hence, he memo y access imes, did no inc ease o he same o de as he CPUs equencies. This has lead o a si u- a ion in which many sys ems a e hea ily memo y bound and, consequen ly, so wa e pe o mance op imiza ion s udies a e o en a ge ing an imp o e- men o he memo y usage. The me hodology o dynamic pe o mance s ubs can be used o op imize hese memo y bound sys ems by using main memo y s ubs. 1.1 Dynamic Pe o mance S ubs The idea behind dynamic pe o mance s ubs is a combina ion o pe o mance imp o emen s [2–4] in al eady exis ing modules o unc ions and he s ub- bing mechanism om so wa e es ing [5,6]. The pe o mance beha io o he componen unde s udy (CUS) will be de e mined and eplaced by a dynamic pe o mance s ub. This s ub can be pa ame e ized o simula e di e en pe - o mance beha io s. Typically, he CUS is he pa o he so wa e unde es (SUT) ha has been iden i ied as a po en ial pe o mance bo leneck. The op imiza ion expe can use dynamic pe o mance s ubs o analyze he pe o mance o he SUT. This p ocedu e ela es o s ubbing a single so wa e uni . Hence, i will be called “local”. The e o e, a “local s ub” has o be buil . The dynamic pe o mance s ub can also be used o change he be- ha io o he comple e sys em. A so wa e module has o be c ea ed, which in e ac s “globally” in he sense o in luencing he whole sys em ins ead o a single so wa e componen . This s ub will be called a “global s ub”. Figu e 1 ske ches he design and he in e ac ion be ween a eal sys em on he le and he dynamic pe o mance s ubs on he igh side. The un illed a owhead indica es a eplacemen . Filled a owheads desc ibe he ex en- sion o a uni by his ea u e and he dashed block p o ides an addi ional unc ionali y o he dynamic pe o mance s ub and will no eally eplace a so wa e uni . In he con ex o dynamic pe o mance s ubs, he sys em unde es is a so wa e module o unc ion, which includes a so wa e pe o mance bo leneck. The amewo k o he dynamic pe o mance s ub consis s o he ollowing 2 sys em so wa e componen (SUT) bo leneck (CUS) dynamic pe o - mance s ub (local) pe o mance simu- la ion unc ions (PSF) simula ed so wa e unc ionali y (SSF) pe o mance measu e- men unc ions (PMF) calib a ion unc ions (CF) dynamic pe o - mance s ub (global) Figu e 1: In e ac ions o “Dynamic Pe o mance S ubs” pa s, which is p esen ed in Figu e 1: Simula ed So wa e Func ionali y (SSF). The simula ed so wa e unc ionali y is used o simula e he unc ional beha io o a componen unde s udy o a so wa e pe o mance bo leneck. This can be achie ed by gene a ing alid ou pu alues o dedica ed inpu alues wi hou execu ing he o iginal unc ionali y. Ano he possibili y is o simula e di e en s a es o objec s inside o he componen unde s udy. Hence, he applica ion can be execu ed wi hou he o iginal unc ionali y as i is ealized by he simula ed so wa e unc ionali y. Pe o mance Simula ion Func ions (PSF). Pe o - mance simula ion unc ions p o ide he abili y o simula e he pe o mance beha io o he eplaced CUS, and a e di ided in o ou ca ego ies: “CPU”, “Memo y”, “I/O” and “Ne wo k”. Fu he mo e, memo y PSF will be subdi ided in o he cache memo y PSF and main memo y PSF espec i ely hei acco ding s ubs, i.e., cache memo y - and main memo y s ubs. Pe o mance Measu emen Func ions (PMF). To p o ide a basic se o e alua ion possibili ies he pe o mance measu emen unc ions can be used. They a e mainly w appe unc ions o he measu emen unc ions al eady p o ided by he sys em. Calib a ion Func ions (CF). In o de o p o ide us wo hy esul s, he s ubs ha e o be adjus ed o a dedica ed sys em. This can be done using he calib a ion unc ions. Fo mo e de ailed in o ma ion on dynamic pe o mance s ubs he eade is e e ed o [1]. A sho in oduc ion o CPU s ubs and memo y s ubs is gi en below. 3 CPU S ubs. CPU s ubs a e a ge ing o handle CPU bound sys ems. The e o e, a gene al app oach o pa ame e ize he un ime beha io and CPU usage has been achie ed as well as a possible ealiza ion has been im- plemen ed. The me hodology o CPU s ubs has been used o imp o e he pe o mance beha io o a long e m e olu ion (LTE) elecommunica ion so wa e. Fu he mo e, he applicabili y o CPU s ubs has been ex ended o suppo mul i-co e and pa allel p ocessing applica ions in [7]. Cache Memo y S ubs. The cache memo y s ubs can be used o sim- ula e he da a cache access beha io o so wa e modules o unc ions o imp o e suspec ed memo y bo lenecks. The algo i hm, a alida ion as well as an e alua ion by means o a p oo o concep o cache memo y s ubs ha e been published in [8]1. Main Memo y S ubs. Main memo y s ubs simula e he s ack and heap beha io o so wa e modules o unc ions. They a e an ex ension o he dynamic pe o mance s ubs amewo k o simula e he main memo y beha io o achie e a cos -bene i o ien ed op imiza ion. They a e de ined in [9]. 1.2 Con en o he Pape The i s pa o his pape enhances he algo i hm o simula e he memo y beha io o an applica ion, known om [9]. A close iew on he design and he execu ion o he algo i hm is shown. An ex ension o he algo i hm o ec ea e si ua ions whe e he amoun o alloca ed s ack memo y emains cons an is in oduced. Second, in [9], he e a e some impe ec ions wi h he simula ion o he ime and memo y alloca ion beha io . This pape ex ends he concep o main memo y s ubs by e alua ing calib a ion unc ions. These can be used o adjus he main memo y s ubs o he sys em. This highly imp o es he simula ion esul s o he “heap”, “s ack” and “ iming” beha io . Addi ion- ally, a p oo o concep is gi en. 2 Main Memo y S ubs Main memo y s ubs a e used o simula e he main memo y pe o mance beha io o a componen unde s udy in he con ex o dynamic pe o mance s ubs. 1Cache memo y s ubs a e e e ed o his in he ea lie publica ion as memo y s ubs. 4 2.1 Me hodology To simula e he main memo y beha io o applica ions he ollowing s eps ha e o be done. Fi s , a main memo y pe o mance bo leneck has o be iden i ied. Now, he bo leneck has o be e alua ed, especially, he unc ional as well as he main memo y beha io ha e o be de e mined. A e wa ds, he unc ional beha io has o be ebuil using he simula ed so wa e unc ion- ali y. Mo eo e , he main memo y pe o mance simula ion unc ions ha e o be ec ea ed. This leads o a main memo y s ub. Now, he memo y beha io o he s ub can be changed acco ding o he needs o he pe o mance s udy. Hence, se e al possible op imiza ion le els as well as hei in luences o he sys em can be simula ed. Mo eo e , s udying he esul s can iden i y “hidden” bo lenecks, e.g., he iming beha io o a ela ed so wa e unc ion can change because o he main memo y s ub. So, possible esul s o an op imiza ion can be simula ed be o e he op imiza ion has o been done. 2.2 Pe o mance Simula ion Func ions In [9], pe o mance simula ion unc ions o simula e he main memo y al- loca ion o a SUT ha e been in oduced. In his sec ion, he algo i hm is b ie ly p esen ed. Figu e 2 shows he design o he memo y simula ion algo i hm. The e- cu si e unc ion, needed o simula e he s ack beha io , is called “alloca e()”. This unc ion is called when he amoun o s ack is inc easing. alloca e() alloca e s ack ( e-)alloca e heap while(…) ime delay ( e-)alloca e heap ime delay ep esen s ace poin x -s ack is inc easing -heap may change - ime is delayed -decide we he s ack inc eases o dec eases a he nex ace poin s ack <=0 ep esen s ace poin x+1 -s ack will dec ease by p e ious alloca ed alue when lea ing ecu sion -heap & ime a e simula ed s ack > 0 I II III go o nex ace poin Figu e 2: Memo y Simula ion Algo i hm 5 Simula e S ack Alloca ion. In he i s pa o he algo i hm (Pa I in Figu e 2), he ime will be delayed as eques ed by he da a se . Then, he s ack memo y is alloca ed by calling he alloca()- unc ion and used wi h he dis memse ()- unc ion (see also [9]). Nex T ace Poin . In he second pa (Pa II), he algo i hm decides whe he he s ack is inc easing o dec easing a he ollowing ace poin . I will again each Pa I i he s ack is inc easing. I he s ack is sh inking, he ecu sion has o be le , which is ealized in Pa III. Simula e S ack Dealloca ion. This is achie ed in he hi d pa (Pa III). The ime delay is simula ed and he s ack memo y is au oma ically eed when lea ing he alloca e()- unc ion. A e ha ing le he alloca e()- unc ion, he algo i hm is ei he back in he p e ious unc ion, which ini ially called he alloca e()- unc ion, o i is in Pa II and he while(...) condi ion p o es once mo e i he amoun o s ack is inc easing a he nex ace poin . This cons uc ion is needed o simula e a sequence o ising and ailing edges. Simula e Heap (De-)Alloca ion. The heap memo y can be de- as well as alloca ed in Pa I and III. As i can inc ease and sh ink a his poin s no hing special has be o conside ed. 2.3 Simula ion Da a File To educe he o e head c ea ed when unning he algo i hm, he measu ing poin s used o simula e a e w i en in o a da a s uc u e wi hin a heade ile ha is used o compile he algo i hm. 1#de ine NUMDATA 4 2 3s uc memAlloc{ 4in ime ; 5in s ackAlloc ; 6in heapAlloc ; 7}memUse[NUMDATA]={ 8[ 0 ] . ime =129, [ 0 ] . s ackAlloc =300, [ 0 ] . heapAlloc =0, 9[ 1 ] . ime =223, [ 1 ] . s ackAlloc =100, [ 1 ] . heapAlloc =200, 10[ 2 ] . ime =384, [ 2 ] . s ackAlloc =−100, [ 2 ] . heapAlloc=−40, 11[ 3 ] . ime =112, [ 3 ] . s ackAlloc =−300, [ 3 ] . heapAlloc=−160 12} Lis ing 1: Example o a Simula ion Da a File 6 The di e en measu emen s show ha he amoun o addi ional s ack memo y alloca ed by he algo i hm (s acko e head) is cons an o e e y call o he alloca e()- unc ion and, he e o e, o i s ecu si e call as well. 5 P oo o Concep In he p e ious sec ions an algo i hm o simula e a p og am’s memo y be- ha io has been p esen ed and he calib a ion unc ions ha e been in o- duced. Now, bo h will be alida ed and e alua ed wi hin his p oo o con- cep . The e o e, a de ined sample o he inpu da a is used o co e a b oad a ie y o possible memo y beha io s. 5.1 Expe imen al Se up This p oo o concep is used e alua e o he impac o he calib a ion unc- ions as well as he enhanced main memo y alloca ion algo i hm. En i onmen . All measu emen s we e pe o med on a FSC Amilo Si3655 No ebook wi h an In el Co e(TM)2 Duo P8400 CPU (In el 64 a - chi ec u e). As ope a ing sys em A ch Linux is used. I s ke nel e sion is 2.6.34. The bina y has been build using he gnu compile collec ion (gcc) wi hou any op imiza ion lags o gua an ee ha he op ion “-O0” has been used. Beside o unning he p oo o concep , he sys em has been idle o a oid u he in luences on he execu ion ime. Measu emen Tools. To o e he possibili y o e alua e he simula ed beha io o he memo y alloca ion a e y p ecise way o measu e he s ack and heap alloca ion has o be used. Fo his eason, he alue o alloca ed s ack memo y is measu ed by inline assemble calls o ead he s ack poin e (esp) and base poin e (ebp) egis- e s. The alue o ebp is aken a he beginning o he simula ion o ge a base alue o he s ack alloca ion. Du ing he simula ion he esp egis e has been ead a e e y measu ing poin . So he o se be ween he s a ing ebp and he ac ual esp gi es he ac ual o al amoun o alloca ed s ack memo y. To measu e he alue o alloca ed heap memo y, he mallin o s uc u e o he malloc.h heade - ile is ead. This s uc u e con ains all he desi ed in o ma ion abou he heap memo y o his p ocess. The measu ed da a has o be associa ed wi h he ime spen in he sys em. Because o his, a e e y measu ing poin a ime s amp is aken using an inline assemble o ead he eal ime clock o he sys em [11]. 13 5.2 Calib a ion Func ion To de e mine he ime, heap and s ack alloca ion o se , c ea ed by execu - ing he simula ion, he calib a ion unc ions as p esen ed in Sec ion 4 a e used. The alues o hose o se depends on he sys em’s implemen a ion. Hence, he calib a ion has o be epea ed when changing any o he sys em’s pa ame e s. As desc ibed in Sec ion 4, di e en simula ion da a iles ha e o be used o measu e he a ious o se alues o he algo i hm. Time O e head. The measu emen o he basic ime o se has shown o be cons an in ou se up. I is de e mined o imebasic = 126775cycles wi h an squa ed coe icien o a ia ion (see also [12]) o 0.009, calcula ed o 100 es e alua ions. Wi hin his p oo o concep , he ime consumed by alloca ing s ack and heap memo y has been iden i ied. The e alua ion o he measu emen s, ha we e desc ibed in Sec ion 4, leads o ollowing esul s o he heap and s ack alloca ion (ydesc ibes he p e iously alloca ed o al memo y size in he memo y segmen and x he newly alloca ed memo y in by es). Equa ion 4 is used o calcula e he numbe o page aul s a a ce ain memo y alloca ion alue. page aul s(x, y) = (y%pagesize) + x pagesize (4) The numbe o by es, which did no cause a page aul is calcula ed (y%pagesize). The esul plus he newly alloca ed memo y (x) is de ided by he pagesize o de e mine he amoun o page aul s o he new alloca ion. The esul is passed o he loo unc ion as page aul s can only be a na u al numbe . P agesize deno es he sys em page size in by es. Time In luence o he Heap Simula ion. The heap memo y will only be ealloca ed. Hence, he memo y alue (x) is always g ea e o equal ze o. As can be seen in Equa ion 5, he ime spen o alloca ing memo y hea ily depends on whe he a page aul is aised in he alloca ion unc ion o no . Addi ionally, he e is only one page aul in he alloca ion unc ion e en i mo e han one page is alloca ed. imealloc heap(x, y) = (3722cycles page aul s(x, y)>0 94cycles page aul s(x, y) = 0 (5) imeuse heap(x, y) = 69cycles ∗(page aul s(x, y) + 1)+ 3252cycles ∗(page aul s(x, y)−1page aul s(x, y)>1 0page aul s(x, y) = 0 (6) 14 In Equa ion 6, he ime spen in he dis memse ()- unc ion is calcula ed. The equa ion consis s o wo pa s. Fi s , he ime spen i e a ing o e he memo y block, i.e., 69cycles∗(page aul s(x, y)+1) and, second, he numbe o page aul s occu ed in he unc ion minus one as one page aul appea ed wi hin he alloca ion unc ion (see also Equa ion 5). Time In luence o he S ack Simula ion. Fo bo h imes, i.e., imealloc s ack(x) and imeuse s ack(x), he algo i hm does no ake signi ican ime o ee he s ack memo y (x≤0). Addi ionally, he “ eed” memo y will no be used, ob iously. Hence, bo h alues a e se o ze o cycles. In he o he case, he ime needed o alloca e and use he new memo y can be calcula ed by using Equa ions 7 and 8. imealloc s ack(x) = 48cycles (7) imeuse s ack(x, y) = 61cycles+ 3358cycles ∗page aul s(x, y) (8) The ime o alloca e s ack memo y (Equa ion 7) is cons an as only he base- and s ack poin e ha e o be adjus ed [9]. The ime spen in he dis memse ()- unc ion o ini ialize he s ack mem- o y (Equa ion 8) is he same as in Equa ion 6. The only di e ence is ha he s ack alloca e unc ion does no aise a page aul . All he desc ibed equa ions we e ound by de e mining he a e age ime s amps o se e al uns in ou es se up and desc ibe he ime beha io o alloca ing and using he heap and s ack memo y in su icien accu acy. When no alloca ing any heap and/o s ack memo y a a ace poin , he espec i e imes a e se o 0. In hose cases, hey do no ha e any in luence on he calcula ion o he o al ime o e head o each measu ing poin . The equa ion used o de e mine he o al ime o e head imeo e head(heap, s ack) is desc ibed in Sec ion 4. Heap and S ack O e head. As s a ed in Sec ion 4, he heap o se ha is in oduced when execu ing he algo i hm has o be de e mined. The measu emen s showed ha heapo e head is cons an a 32 by es, i he e is no heap memo y alloca ed wi hin he simula ion. I he e is any heap memo y alloca ed du ing he simula ion, he heap o e head ises o 40 by es and also emains cons an while he memo y is alloca ed. Measu ing wi h he gi en calib a ion ace ile esul s in a cons an in- c ease o alloca ed s ack pe ace poin . So, he call o he alloca ion unc ion alloca es a cons an amoun o s ack memo y. Because o his measu emen , he s ack o se is de e mined o s acko se = 216 by es as well as o 15 s acko e head(x) =      64by es x > 0 0by es x= 0 −64by es x < 0 . As hese by es o e head a e cons an o each execu ion, he e is no need o an s a is ical in e p e a ion. The alues o s ack, heap and ime o e head is used o p oduce a simula- ion da a ile. This allows he simula ion algo i hm o pe o m a simula ion ha i as exac as possible o he desi ed beha io o memo y alloca ion. 5.3 Measu emen and E alua ion A e he measu emen s o he calib a ion unc ions, all necessa y da a o he simula ion o he memo y beha io is a ailable. The same inpu da a as in [9] has been used and he ime, heap and s ack o e head has been de e mined ia he calib a ion unc ions. Simula ion Da a File. As he i s s ep in simula ing he memo y beha io o a sys em, a alid simula ion da a ile has o be gene a ed. Wi h he inpu da a and he o e head o ime delay, heap and s ack alloca ion, he needed ace poin s a e calcula ed. The ou pu is p esen ed as a heade ile, see Sec ion 2.3, con aining he da a se used wi hin he simula ion algo i hm. Measu emen . A e c ea ing a alid heade ile, an execu able o he simula ion algo i hm can be build. 4000 6000 8000 10000 12000 memo y [by es] s ack inpu da a heap inpu da a s ack simula ed da a heap simula ed da a 0 2000 4000 6000 8000 10000 12000 0 1000000 2000000 3000000 4000000 5000000 6000000 memo y [by es] ime [µs] s ack inpu da a heap inpu da a s ack simula ed da a heap simula ed da a Figu e 3: Compa ison o O iginal and Simula ed Memo y Beha io 16 Figu e 3 shows he measu ed s ack and heap memo y alloca ion in com- pa ison o he desi ed beha io . The ime in mic oseconds is p in ed a he X-axis and he o al alloca ed amoun o memo y is shown a he Y-axis. The igu e shows he o iginal s ack beha io , he measu ed s ack alloca ion du ing he simula ion, he o iginal heap alloca ion and he measu ed heap beha io while simula ing he memo y alloca ion. Simula ing Execu ion Time. When compa ing he ime supposed by he simula ion da a ile, which is 4.8 seconds, and he execu ion ime measu ed in he e alua ion, which is 4.8000444 seconds, i can be seen ha he simula ion p oduces only a small amoun o ime o e head. He e, an o e head o 9 ∗10−3% in o al execu ion ime is p oduced. So, he o al execu ion ime is su icien ly simula ed. Simula ing Heap Alloca ion. The analyses o he heap’s alloca ion simula ion, as shown in Figu e 3, depic s ha i is e y accu a e. The e is nea ly no a ia ion o he desi ed beha io o heap alloca ion. I is possible o simula e si ua ions whe e he heap is ising and alling. Fas swi ches o alloca ing and eeing heap memo y a e simula ed exac ly. The simula ion algo i hm wo ks absolu ely ine o simula ing heap memo y alloca ion in ou example. Simula ing S ack Alloca ion. The esul s o he simula ion o s ack memo y alloca ion beha io also a e sa is ying. The alloca ion beha io can be ep oduced exac ly. Rising and ailing edges as well as cons an amoun s o s ack a e simula ed in a co ec way. High peaks and as changes o alloca ed s ack a e ebuild as desi ed. E en slow ises o he alloca ed amoun o s ack a e simula ed qui e well. Summa y. The calib a ion unc ions ha a e in oduced wi hin his pape as well as he p esen ed memo y simula ion algo i hm ully mee he equi emen s o simula e he memo y beha io o a sys em unde es . Bo h, heap and s ack memo y alloca ion, a e simula ed wi h high accu acy and almos wi hou an o e head in execu ion ime. 6 Conclusion and Fu u e Wo k This pape p esen s an algo i hm o simula e he main memo y beha io o applica ions in he con ex o dynamic pe o mance s ubs. The e a e wo con- ibu ions: An ex ension and imp o emen o he simula ion algo i hm and he de e mina ion o he a ious ypes o o e head caused by he algo i hm, e.g., ime o e head caused by execu ing he algo i hm. Wi h he imp o emen o he algo i hm, i is now possible o simula e cons an s ack beha io . Addi ionally, calib a ion unc ions ha e been in o- 17 duced o e alua e he o e head alues caused by execu ing he algo i hm. Conside ing he calib a ion unc ions leads o an almos exac simula ion o he main memo y beha io . This has been alida ed wi h a p oo o concep . The u u e wo k will ocus on an algo i hm o measu e he componen unde s udy as well as o gene a e he simula ion da a ile. Mo eo e , a me hodology, which applies he main memo y s ubs in indus ial case s udies, has o be de ined and e alua ed. I has been shown ha he beha io o he s ack and heap usage can be simula ed wi hou signi ican e o s. Based on he p esen ed algo i hm, a goal o ien ed pe o mance op imiza ion ega ding he memo y beha io o an a bi a y applica ion can be achie ed. 7 Acknowledgmen s The au ho s would like o hank he long e m e olu ion g oup in Ulm o he excellen suppo and con ibu ions o his esea ch p ojec . Fo ca e ul eading and p o iding aluable commen s on d a e sions o his pape we would like o hank Helge Janicke. We would also like o hank he So wa e Technology Resea ch Labo a o y (STRL) om he De Mon o Uni e si y, especially F ancois Siewe and Hussein Zedan o p o iding he app op ia e en i onmen o esea ch. Re e ences [1] P. T app and C. Facchi, “Pe o mance Imp o emen Using Dynamic Pe o mance S ubs,” Fachhochschule Ingols ad , Tech. Rep. 14, Aug. 2007. [2] R. Jain, The a o compu e sys ems pe o mance analysis. Wiley and sons, Inc., 1991. [3] N. H. Gun he , The P ac ical Pe o mance Analys . McG aw-Hill Ed- uca ion, 1998. [4] J. J. Ma ciniak, Encyclopedia o So wa e Enginee ing, 2nd ed. John Wiley & Sons Inc, 2002. [5] A. Be olino and E. Ma che i, So wa e Enginee ing: The De elopmen P ocess - A B ie Essay on So wa e Tes ing, 3 d ed. John Wiley & Sons, Inc., 2005, ol. 1, ch. 7, pp. 393–411. 18 [6] I. Somme ille, So wa e Enginee ing, 6 h ed. Addison-Wesley, 2001, ge man edac ion. [7] P. T app, M. Meye , and C. Facchi, “Using CPU S ubs o Op imize Pa allel P ocessing Tasks: An Applica ion o Dynamic Pe o mance S ubs,” in ICSEA ’10: P oceedings o he In e na ional Con e ence on So wa e Enginee ing Ad ances. IEEE Compu e Socie y, 2010. [8] P. T app, C. Facchi, and S. Bi l, “The Concep o Memo y S ubs as a Specializa ion o Dynamic Pe o mance S ubs o Simula e Memo y Access Beha io ,” in CMG ’09: In e na ional Con e ence P oceedings. Compu e Measu emen G oup, 2009. [9] P. T app and C. Facchi, “Main Memo y S ubs o Simula e Heap and S ack Memo y Beha io ,” in CMG ’10: In e na ional Con e ence P o- ceedings. Compu e Measu emen G oup, 2010. [10] P. Ezol , “A s udy in malloc: a case o excessi e mino aul s,” in ALS ’01: P oceedings o he 5 h annual Linux Showcase & Con e ence. Be keley, CA, USA: USENIX Associa ion, 2001, pp. 17–17. [11] Y. E sion and D. Fei elson, “Time S amp Coun e s Lib a y - Mea- su emen s wi h Nano Seconds Resolu ion,” The Heb ew Uni e si y o Je usalem, Tech. Rep. 2000-36, 2000. [12] R. S ini asan and O. Lubeck, “Mon eSim: A Mon e Ca lo Pe o mance Model o In-o de Mic oa chi ec u es,” ACM SIGARCH Compu e A - chi ec u News, ol. 33, no. 5, pp. 75–80, Dec. 2005. 19