Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Le garbage collector .NEt

1 174 vues

Publié le

Publié dans : Logiciels
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Le garbage collector .NEt

  1. 1. www.talentsoft.com IDENTIFIER ÉVALUER DÉVELOPPER PLANIFIER Auteur(s)/Intervenant(s) : Date : Autour du Framework .NET La gestion de la mémoire Olivier MARTINET octobre2013
  2. 2. 2 Sommaire • Le framework .NET La compilation CLR • La gestion de la mémoire Heap Stack • Le garbage-collector Son rôle Son fonctionnement Ses configurations Son avenir • Comment monitorer sa mémoire
  3. 3. 3 Le Framework .NET – La compilation
  4. 4. 4 Framework .NET – Common Langage Runtime «  Le CLR (Common Language Runtime) est le cœur de Microsoft .NET Framework et fournit  l'environnement d'exécution de la totalité du code .NET Framework.  » Le CLR fournit divers fonctions et services requis pour l'exécution du programme: •La compilation juste-à-temps (JIT just in time) •la mise en application de la cohérence des types (CTS common type system) •la gestion des exceptions •la gestion des threads •l'allocation et la gestion de la mémoire
  5. 5. 5 La gestion de la mémoire Pile (stack) •Allocation statique •Appels des fonctions •Le type valeur ( struct ) •Durée de vie cours (contexte de création) Tas (heap) •Allocation dynamique •Zones nécessitant d’être libérée ensuite •Le type référence comme une instance de classe ou de tableau, est alloué dans une zone de mémoire différente appelée tas. •Durée de vie (long) (référencé)
  6. 6. 6 Stack B() Class1 instance; La gestion de la mémoire Heap Main A() Instance3 Instance4 Instance2 Class2 instance; int i; struct i; Class3 instance; Instance1
  7. 7. 7 La gestion de la mémoire - Stack • Limite: 1Mo par défaut • Exception StackOverflowException  Exemple
  8. 8. 8 La gestion de la mémoire - Heap • Limite: 2Go (Limite système) • Exception OutOfMemoryException  Exemple
  9. 9. 9 Le garbage-collector – Son rôle (ramasse-miettes) • Il vous permet de développer sans avoir à libérer de la mémoire. • Il alloue efficacement les objets sur le tas managé. • Il libère les objets qui ne sont plus utilisés, efface leur mémoire et garde la mémoire disponible pour les futures allocations. • Il sécurise la mémoire en s'assurant qu'un objet ne peut pas utiliser le contenu d'un autre objet.
  10. 10. 10 Le garbage-collector – Son fonctionnement 1. Initialisation du GC par le CLR 2. Allocation d’un segment de mémoire pour stocker et gérer des objets sur tas managé. • Il existe un tas managé pour chaque processus managé. • Tous les threads du processus allouent des objets sur le même tas.
  11. 11. 11 Le garbage-collector – Son fonctionnement • le garbage-collector libère la mémoire occupée par les objets morts. Le processus de libération compacte les objets vivants afin qu'ils soient déplacés ensemble. • L'espace inutilisé est supprimé, ce qui entraîne la diminution du tas.
  12. 12. 12 Le garbage-collector – Son fonctionnement 1. Arrêt de tout les threads 2. Crée une liste de tous les objets actifs. 3. Mise à jour des références aux objets qui seront compactés 4. Une phase de compactage qui libère l'espace occupé par les objets morts et compacte les objets survivants. La phase de compactage déplace les objets qui ont survécu à un garbage collection vers l'extrémité la plus ancienne du segment.
  13. 13. 13 Le garbage-collector – Son fonctionnement Le tas est organisé en générations. •Génération 0 objets éphémères (zone majeure de garbage collection) •Génération 1 objets éphémères •Génération 2 objets durables
  14. 14. 14 Le garbage-collector – Son fonctionnement • Une opération de garbage collection se fait sur une génération est ses génération plus jeune. • Garbage Collection de génération 2  garbage collection complet • Les objets survivants à une collection sont promus à la génération suivante
  15. 15. 15 Le garbage-collector – Sa Configuration • Le garbage collector s'ajuste automatiquement. • gcServer (optimisation >2 processeurs) • Uniquement pour les station multiprocesseur • GC « station de travail » autrement • gcConcurrent • GC simultanée, depuis .NET 4 GC d’arrière plan <configuration> <runtime> <gcServer enabled=« false" /> <gcConcurrent enabled=« true"/> </runtime> </configuration>
  16. 16. 16 Le garbage-collector – Sa Configuration • gcServer • Uniquement pour les stations multiprocesseurs • Optimisé pour le débit • 1 Thread GC par CPU en THREAD_PRIORITY_HIGHEST • Si vous disposez de 12 processus qui s'exécutent sur un ordinateur possédant 4 processeurs, il y aura 48 threads de garbage collection dédiés s'ils utilisent tous le garbage collection de serveur • GC « station de travail » autrement
  17. 17. 17 Le garbage-collector – Sa Configuration • gcConcurrent • Exécuter la collection en même temps sur un thread dédié • Uniquement les opérations garbage collection de génération 2 • Les générations 0 et 1 sont toujours non simultanées car elles se terminent très rapidement. • Uniquement pour « station de travail » • Depuis .NET 4.5 pour « server/station de travail »
  18. 18. 18 Le garbage-collector – Sa Configuration • gcConcurrent
  19. 19. 19 Le garbage-collector – Sa Configuration • LatencyMode • Batch • Désactive GCConcurrent et libère des objets dans un appel de lot. • ↗ débit • ↘ réactivité. Interactive • Active GCConcurrent (mode courant) LowLatency • Attend d’être sous pression mémoire pour lancer une collection (complet / gen2) • Période limité dans le temps (~opération marché financier) SustainedLowLatency • Idem LowLatency génération 2 en arrière plan
  20. 20. 20 Le garbage-collector
  21. 21. 21 Le garbage-collector • En réalité, il y a deux types de heap: • Small Object Heap (SOH) (Vu précédemment) • Large Object Heap (LOH) • Taille > 85 000 octets • Fonctionnement différent
  22. 22. 22 Le garbage-collector
  23. 23. 23 Le garbage-collector Framework 4.5.1 •RTM depuis 24h avec VS 2013 •RyuJIT •3ème et nouveau GCSettings LargeObjectHeapCompactionMode
  24. 24. 24 Monitoring Outils de monitoring •Perfmon Le plus accessible •Sos.dll Le plus efficace •Clr Profiler Le plus compliqué •ANTS Memory Profiler 8 475 €
  25. 25. 25 Monitoring - Perfmon
  26. 26. 26 Monitoring – Sos.dll Pas sur des applications ASP (Limitation) Immediate Windows: load sos
  27. 27. 27 Monitoring – CLR Profiler 1 Télécharger: http://download.microsoft.com/download/4/4/2/442d67c7-a1c1-4884-9715-803a7b485b82/clr%20profiler.exe Application winform produisant des graphes pour l’analyse. Entre autre: • Heap Graph Objets avec leurs connections durant l’execution Allocation Graph Pile d’appel d’allocation d’objet Histogram By Age Cycle de vie de l’allocation des objets Histogram Relocated Types Déplacement des objets dans une autre génération du GC
  28. 28. 28 Monitoring – CLR Profiler 2 (size allocation)
  29. 29. 29 Monitoring – CLR Profiler 3 (heap graph)
  30. 30. 30 Références • Gestion de la mémoire et garbage collection dans le .NET Framework http://msdn.microsoft.com/fr-fr/library/vstudio/0xy59wtx.aspx • Technical Papers chez Red Gates http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/technical-papers/ • Commandes sos.dll http://msdn.microsoft.com/en-us/library/bb190764.aspx • En complément https://www.simple-talk.com/dotnet/.net-framework/the-dangers-of-the-large-object-heap/ http://blogs.msdn.com/b/mariohewardt/archive/2013/06/26/no-more-memory-fragmentation-on-the-large-object- heap.aspx http://msdn.microsoft.com/fr-fr/magazine/cc163528.aspx
  31. 31. 31 Autour de .NET – La Gestion de la mémoire.
  32. 32. Msdn Library : www.talentsoft.com Intel : contact-ts@talentsoft.com Référence : http://www.website.com France • TalentSoft Headquarters 35 ter, avenue André Morizet – 92100 Boulogne Billancourt – France Tél: +33 (0)1 41 86 05 60 • Fax: +33 (0)1 41 86 05 61

×