SlideShare una empresa de Scribd logo
1 de 26
Memory profiling in Unity
Kim Steen Riber (kim@unity3d.com)
Page
Who am I?
• Core developer @ Unity
• Released games
• LIMBO
• Watchmen
• Total overdose
• Unity focus areas
• CPU performance
• Memory optimizations
09-05-2013 2
Page
Optimizing your game
• FPS
• CPU usage
(Gamecode, Physics, Skinning, Particles, …)
• GPU usage (Drawcalls, Shader usage, Image
effects, …)
• Hickups
• Spikes in framerate caused by heavy tasks (e.g.
GC.Collect)
• Physics world rebuild due to moved static colliders
• Memory
• Maintaining small runtime memory on device
• Avoid GC Hickups by reducing memory activity
• Leak detection
09-05-2013 3
Page
Performance
• Unity Profiler (Pro Feature)
• CPU
• GPU
• Memory usage
• New Detailed memory view (Unity 4.1)
• Memory reference view (Unity 4.2)
09-05-2013 4
Page
CPU Profiler
• Cpu time consumption for methods
• Mono memory activity
• Remote Profiling of you game running on target device
• Deep profile (editor only)
• Detailed view, but large overhead, only usable for very small
scenes
09-05-2013 5
Page
Memory Profiler
• Simple and Detailed memory view (Unity 4.1)
• Detail view is taken as a snapshot (too expensive for per
frame)
• Reference view (Unity 4.2)
• See where an object is referenced – Good for leak hunting
09-05-2013 7
Page
Memory Profiler
09-05-2013 8
• Simple memory view
• Unity reserves chunks of memory from the os
• Mono allocates from a reserved heap
• GfxMemory is an estimate
Page
Mono vs. Unity Memory
• Managed - Mono
• Script objects
• Wrappers for unity
objects
• Game objects
• Assets
• Components
• …
• Memory is garbage
collected
09-05-2013 9
• Native - Unity internal
• Asset data
• Textures
• Meshes
• Audio
• Animation
• Game objects
• Engine internals
• Rendering
• Particles
• Webstreams
• Physics
• …..
Page
Mono Memory Internals
• Allocates system heap blocks for allocations
• Garbage collector cleans up
• Will allocate new heap blocks when needed
• Fragmentation can cause new heap blocks even
though memory is not exhausted
• Heap blocks are kept in Mono for later use
• Memory can be given back to the system after a while
09-05-2013 10
Page
Fragmentation
• Memory will get fragmentet if there is a lot of
activity
09-05-2013 11
Mono: 16K System:
64K
Mono: 32K System:
64K
Mono: 32K System:
64K
Mono: 48K System:
128K
Page
Avoiding Allocations
• Reuse temporary buffers
• If buffers for data processing are needed every
frame, allocate the buffer once and reuse
• Allocate pools of reusable objects
• Create freelists for objects that are needed often
• Use structs instead of classes
• Structs are placed on the stack, while classes uses the
heap
• Don’t use OnGUI
• Even empty OnGUI calls are very memory intensive
09-05-2013 12
Page
Avoiding Allocations
• Use the CPU profiler to identify mono allocations
09-05-2013 13
Page
Unity Object wrapper
• Some Objects used in scripts have large native
backing memory in unity
• Memory not freed until Finalizers have run
09-05-2013 14
WWW
Decompression buffer
Compressed file
Decompressed file
Managed Native
Page
Mono Garbage Collection
• Object goes out of scope
• GC.Collect runs when
• Mono exhausts the heap space
• Or user calls System.GC.Collect()
• Finalizers
• Run on a separate thread
• Unity native memory
• Dispose() cleans up internal
memory
• Eventually called from finalizer
• Manually call Dispose() to cleanup
09-05-2013 15
Main thread Finalizer thread
www = null;
new(someclass
);
//no more heap
-> GC.Collect();
www.Dispose();
.....
Page
Garbage collect and Dispose
Demo
09-05-2013 16
Page
Assetbundle memory usage
• WebStream
• Compressed file
• Decompression buffers
• Uncompressed file
• Assetbundle
• Map of objects and offsets in WebStream
• Instantiated objects
• Textures, Meshes, etc.
09-05-2013 17
Page
Assetbundle memory usage
• WWW www = new WWW(assetbundle_url);
• Loads the compressed file into memory
• Constructs decompression buffers (8MB per file)
• Decompresses the file into memory
• Deallocates the decompression buffers
• One decompression buffer of 8MB is reused and
never deallocated
09-05-2013 18
Page
Assetbundle memory usage
• AssetBundle ab = www.assetBundle;
• Loads the map of where objects are in the webstream
• Retains the www WebStream
09-05-2013 19
WebStream
Tex
Tex
Mes
h
AssetBundle
Page
Assetbundle memory usage
• AssetBundle ab = www.assetBundle;
• Loads the map of where objects are in the webstream
• Retains the www WebStream
09-05-2013 20
WebStream
Tex
Tex
Mes
h
AssetBundle
Loaded objects
Page
Assetbundle memory usage
• Texture2D tex =
ab.Load(“MyTex", typeof(Texture2D));
• Instantiates a texture from the assetbundle
• Uploads the texture to the GPU
• On editor a system copy is retained (2x memory)
• Transferbuffer for the RenderThread will grow to fit the
largest Texture or Vertexbuffer (never shrinks)
09-05-2013 21
Page
Assetbundle memory usage
• Deleting the WebStream
• www.Dispose(); // will count down the retain count
• If not called, finalizers will clean the memory eventually
• Deleting the Assetbundle
• ab.Unload(false);
• Unloads the map and counts down the www retain count
• ab.Unload(true);
• Will also force unload all assets created from the
assetbundle
09-05-2013 22
Page
Assetbundle memory usage
• Removing the loaded objects from memory
• ab.Unload(true)
• Force unload objects loaded by assetbundle
• UnloadUnusedAssets()
• Unloads when there are no more references to the object
• Use the memory profiler to find remaining
references
• In Unity 4.1 a reason why a Object is given
• In Unity 4.2 specific scripts or Objects referencing a
given object are shown
09-05-2013 23
Page
Assetbundle memory usage
• For best memory efficiency do one assetbundle at
a time
• If more assetbundles are needed at the same
time, load one www object into memory at a time, to
reduce decompression buffer usage
09-05-2013 24
Page
Assetbundle memory usage
Demo
09-05-2013 25
Page
Conclusions
• Avoid memory activity
• Use the memory profiler to monitor memory usage
• Load one WWW object at a time
• Use Dispose() on objects that derive from IDisposable
• Specially if they have a large native memory footprint
• Use UnloadUnusedAssets() to clean up assets
09-05-2013 26
Page
Questions?
09-05-2013 27

Más contenido relacionado

La actualidad más candente

이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019devCAT Studio, NEXON
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현YEONG-CHEON YOU
 
CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기YEONG-CHEON YOU
 
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010Ryan Park
 
Windows system - memory개념잡기
Windows system - memory개념잡기Windows system - memory개념잡기
Windows system - memory개념잡기ChangKyu Song
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법YEONG-CHEON YOU
 
AAA게임_UI_최적화_및_빌드하기.pptx
AAA게임_UI_최적화_및_빌드하기.pptxAAA게임_UI_최적화_및_빌드하기.pptx
AAA게임_UI_최적화_및_빌드하기.pptxTonyCms
 
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅DongMin Choi
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Unity Technologies
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Johan Andersson
 
UE4 Garbage Collection
UE4 Garbage CollectionUE4 Garbage Collection
UE4 Garbage CollectionQooJuice
 
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리MinGeun Park
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr내훈 정
 
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014devCAT Studio, NEXON
 
GameInstance에 대해서 알아보자
GameInstance에 대해서 알아보자GameInstance에 대해서 알아보자
GameInstance에 대해서 알아보자TonyCms
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략YEONG-CHEON YOU
 
재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안Sunnyrider
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)Bongseok Cho
 
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원강 민우
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현noerror
 

La actualidad más candente (20)

이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
이무림, Enum의 Boxing을 어찌할꼬? 편리하고 성능좋게 Enum 사용하기, NDC2019
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현
 
CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기
 
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010
온라인 게임에서 사례로 살펴보는 디버깅 in NDC2010
 
Windows system - memory개념잡기
Windows system - memory개념잡기Windows system - memory개념잡기
Windows system - memory개념잡기
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
 
AAA게임_UI_최적화_및_빌드하기.pptx
AAA게임_UI_최적화_및_빌드하기.pptxAAA게임_UI_최적화_및_빌드하기.pptx
AAA게임_UI_최적화_및_빌드하기.pptx
 
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅
[NDC 2018] 신입 개발자가 알아야 할 윈도우 메모리릭 디버깅
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)
 
UE4 Garbage Collection
UE4 Garbage CollectionUE4 Garbage Collection
UE4 Garbage Collection
 
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr
 
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014
이승재, 사례로 배우는 디스어셈블리 디버깅, NDC2014
 
GameInstance에 대해서 알아보자
GameInstance에 대해서 알아보자GameInstance에 대해서 알아보자
GameInstance에 대해서 알아보자
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략
 
재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)
 
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원
[IGC2018] 에픽게임즈 신광섭 - 언리얼엔진4 포트나이트 멀티플랫폼 개발 지원
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현
 

Destacado

ラクガキ忍者制作秘話
ラクガキ忍者制作秘話ラクガキ忍者制作秘話
ラクガキ忍者制作秘話koppepan
 
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)ミルク株式会社
 
Unityプロファイラについて
UnityプロファイラについてUnityプロファイラについて
UnityプロファイラについてMio Ku-tani
 
SIG-Audio#6 プラグインを書かなくてもここまで出来る!Unityサウンド
SIG-Audio#6 プラグインを書かなくてもここまで出来る!UnityサウンドSIG-Audio#6 プラグインを書かなくてもここまで出来る!Unityサウンド
SIG-Audio#6 プラグインを書かなくてもここまで出来る!UnityサウンドIGDA Japan SIG-Audio
 
「もののけ大戦“陣”」製作事例
「もののけ大戦“陣”」製作事例「もののけ大戦“陣”」製作事例
「もののけ大戦“陣”」製作事例Ryohei Tokimura
 
Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko3D
 
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...How to Web
 
Make "PONG" : 아키텍팅과 동기화 테크닉
Make "PONG" : 아키텍팅과 동기화 테크닉Make "PONG" : 아키텍팅과 동기화 테크닉
Make "PONG" : 아키텍팅과 동기화 테크닉iFunFactory Inc.
 
2016 NDC - 클라우드 시대의 모바일 게임 운영 플랫폼 구현
2016 NDC  - 클라우드 시대의  모바일 게임 운영 플랫폼 구현2016 NDC  - 클라우드 시대의  모바일 게임 운영 플랫폼 구현
2016 NDC - 클라우드 시대의 모바일 게임 운영 플랫폼 구현iFunFactory Inc.
 
게임 운영에 필요한 로그성 데이터들에 대하여
게임 운영에 필요한 로그성 데이터들에 대하여게임 운영에 필요한 로그성 데이터들에 대하여
게임 운영에 필요한 로그성 데이터들에 대하여iFunFactory Inc.
 
Unity technologies on BarCamp Vilnius
Unity technologies on BarCamp VilniusUnity technologies on BarCamp Vilnius
Unity technologies on BarCamp VilniusBarCamp Lithuania
 
ダイスふる制作レポート Unityでアプリ個人開発
ダイスふる制作レポート Unityでアプリ個人開発ダイスふる制作レポート Unityでアプリ個人開発
ダイスふる制作レポート Unityでアプリ個人開発Ryohei Tokimura
 
Asset bundleなどの、Unity3d基礎知識
Asset bundleなどの、Unity3d基礎知識Asset bundleなどの、Unity3d基礎知識
Asset bundleなどの、Unity3d基礎知識Nobukazu Hanada
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in UnityDevGAMM Conference
 
Unity名古屋セミナー [Shadowgun]
Unity名古屋セミナー [Shadowgun]Unity名古屋セミナー [Shadowgun]
Unity名古屋セミナー [Shadowgun]MakotoItoh
 
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드강 민우
 
GREE流 新次元ゲーム開発
GREE流 新次元ゲーム開発GREE流 新次元ゲーム開発
GREE流 新次元ゲーム開発Kazuki Sakamoto
 
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교iFunFactory Inc.
 
Practical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on MobilesPractical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on MobilesValentin Simonov
 
2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기iFunFactory Inc.
 

Destacado (20)

ラクガキ忍者制作秘話
ラクガキ忍者制作秘話ラクガキ忍者制作秘話
ラクガキ忍者制作秘話
 
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)
「会社で寝よう!」制作レポート(3Dカジュアルゲームの開発手法)
 
Unityプロファイラについて
UnityプロファイラについてUnityプロファイラについて
Unityプロファイラについて
 
SIG-Audio#6 プラグインを書かなくてもここまで出来る!Unityサウンド
SIG-Audio#6 プラグインを書かなくてもここまで出来る!UnityサウンドSIG-Audio#6 プラグインを書かなくてもここまで出来る!Unityサウンド
SIG-Audio#6 プラグインを書かなくてもここまで出来る!Unityサウンド
 
「もののけ大戦“陣”」製作事例
「もののけ大戦“陣”」製作事例「もののけ大戦“陣”」製作事例
「もののけ大戦“陣”」製作事例
 
Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with Minko
 
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
 
Make "PONG" : 아키텍팅과 동기화 테크닉
Make "PONG" : 아키텍팅과 동기화 테크닉Make "PONG" : 아키텍팅과 동기화 테크닉
Make "PONG" : 아키텍팅과 동기화 테크닉
 
2016 NDC - 클라우드 시대의 모바일 게임 운영 플랫폼 구현
2016 NDC  - 클라우드 시대의  모바일 게임 운영 플랫폼 구현2016 NDC  - 클라우드 시대의  모바일 게임 운영 플랫폼 구현
2016 NDC - 클라우드 시대의 모바일 게임 운영 플랫폼 구현
 
게임 운영에 필요한 로그성 데이터들에 대하여
게임 운영에 필요한 로그성 데이터들에 대하여게임 운영에 필요한 로그성 데이터들에 대하여
게임 운영에 필요한 로그성 데이터들에 대하여
 
Unity technologies on BarCamp Vilnius
Unity technologies on BarCamp VilniusUnity technologies on BarCamp Vilnius
Unity technologies on BarCamp Vilnius
 
ダイスふる制作レポート Unityでアプリ個人開発
ダイスふる制作レポート Unityでアプリ個人開発ダイスふる制作レポート Unityでアプリ個人開発
ダイスふる制作レポート Unityでアプリ個人開発
 
Asset bundleなどの、Unity3d基礎知識
Asset bundleなどの、Unity3d基礎知識Asset bundleなどの、Unity3d基礎知識
Asset bundleなどの、Unity3d基礎知識
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in Unity
 
Unity名古屋セミナー [Shadowgun]
Unity名古屋セミナー [Shadowgun]Unity名古屋セミナー [Shadowgun]
Unity名古屋セミナー [Shadowgun]
 
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드
[IGC 2016] 유니티코리아 오지현 - “뭣이 중헌디? 성능 프로파일링도 모름서”: 유니티 성능 프로파일링 가이드
 
GREE流 新次元ゲーム開発
GREE流 新次元ゲーム開発GREE流 新次元ゲーム開発
GREE流 新次元ゲーム開発
 
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교
PC 와 모바일에서의 P2P 게임 구현에서의 차이점 비교
 
Practical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on MobilesPractical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on Mobiles
 
2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기
 

Similar a [UniteKorea2013] Memory profiling in Unity

Things I wish I knew about GemStone
Things I wish I knew about GemStoneThings I wish I knew about GemStone
Things I wish I knew about GemStoneESUG
 
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~Unity Technologies Japan K.K.
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法Unite2017Tokyo
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法Unity Technologies Japan K.K.
 
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixXPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixThe Linux Foundation
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...Kuniyasu Suzaki
 
Data Management and Streaming Strategies in Drakensang Online
Data Management and Streaming Strategies in Drakensang OnlineData Management and Streaming Strategies in Drakensang Online
Data Management and Streaming Strategies in Drakensang OnlineAndre Weissflog
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Techizzaa
 
Memory management in Andoid
Memory management in AndoidMemory management in Andoid
Memory management in AndoidMonkop Inc
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
Driver development – memory management
Driver development – memory managementDriver development – memory management
Driver development – memory managementVandana Salve
 
Linux kernel memory allocators
Linux kernel memory allocatorsLinux kernel memory allocators
Linux kernel memory allocatorsHao-Ran Liu
 
NDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityNDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityMatthieu Bouthors
 
Improving Game Performance in the Browser
Improving Game Performance in the BrowserImproving Game Performance in the Browser
Improving Game Performance in the BrowserFITC
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
When Smalltalk images get large
When Smalltalk images get largeWhen Smalltalk images get large
When Smalltalk images get largeESUG
 

Similar a [UniteKorea2013] Memory profiling in Unity (20)

Things I wish I knew about GemStone
Things I wish I knew about GemStoneThings I wish I knew about GemStone
Things I wish I knew about GemStone
 
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
【Unite Tokyo 2018】その最適化、本当に最適ですか!? ~正しい最適化を行うためのテクニック~
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixXPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
 
Data Management and Streaming Strategies in Drakensang Online
Data Management and Streaming Strategies in Drakensang OnlineData Management and Streaming Strategies in Drakensang Online
Data Management and Streaming Strategies in Drakensang Online
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)
 
Memory management in Andoid
Memory management in AndoidMemory management in Andoid
Memory management in Andoid
 
memory_mapping.ppt
memory_mapping.pptmemory_mapping.ppt
memory_mapping.ppt
 
week1slides1704202828322.pdf
week1slides1704202828322.pdfweek1slides1704202828322.pdf
week1slides1704202828322.pdf
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
Driver development – memory management
Driver development – memory managementDriver development – memory management
Driver development – memory management
 
Linux kernel memory allocators
Linux kernel memory allocatorsLinux kernel memory allocators
Linux kernel memory allocators
 
NDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing SecurityNDH2k12 Cloud Computing Security
NDH2k12 Cloud Computing Security
 
Improving Game Performance in the Browser
Improving Game Performance in the BrowserImproving Game Performance in the Browser
Improving Game Performance in the Browser
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
When Smalltalk images get large
When Smalltalk images get largeWhen Smalltalk images get large
When Smalltalk images get large
 

Más de William Hugo Yang

[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android contentWilliam Hugo Yang
 
[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in DepthWilliam Hugo Yang
 
[UniteKorea2013] Unity Hacks
[UniteKorea2013] Unity Hacks[UniteKorea2013] Unity Hacks
[UniteKorea2013] Unity HacksWilliam Hugo Yang
 
[UniteKorea2013] Butterfly Effect DX11
[UniteKorea2013] Butterfly Effect DX11[UniteKorea2013] Butterfly Effect DX11
[UniteKorea2013] Butterfly Effect DX11William Hugo Yang
 
[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering PipelineWilliam Hugo Yang
 
[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricksWilliam Hugo Yang
 
[UniteKorea2013] 2D content workflows
[UniteKorea2013] 2D content workflows[UniteKorea2013] 2D content workflows
[UniteKorea2013] 2D content workflowsWilliam Hugo Yang
 

Más de William Hugo Yang (7)

[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content
 
[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth[UniteKorea2013] Serialization in Depth
[UniteKorea2013] Serialization in Depth
 
[UniteKorea2013] Unity Hacks
[UniteKorea2013] Unity Hacks[UniteKorea2013] Unity Hacks
[UniteKorea2013] Unity Hacks
 
[UniteKorea2013] Butterfly Effect DX11
[UniteKorea2013] Butterfly Effect DX11[UniteKorea2013] Butterfly Effect DX11
[UniteKorea2013] Butterfly Effect DX11
 
[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline
 
[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks
 
[UniteKorea2013] 2D content workflows
[UniteKorea2013] 2D content workflows[UniteKorea2013] 2D content workflows
[UniteKorea2013] 2D content workflows
 

Último

Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practicesaijazuddin14
 
Part 1 of the Holy Quran- Alif Laam Meem
Part 1 of the Holy Quran- Alif Laam MeemPart 1 of the Holy Quran- Alif Laam Meem
Part 1 of the Holy Quran- Alif Laam MeemAbdullahMohammed282920
 
Dgital-Self-UTS-exploring-the-digital-self.pptx
Dgital-Self-UTS-exploring-the-digital-self.pptxDgital-Self-UTS-exploring-the-digital-self.pptx
Dgital-Self-UTS-exploring-the-digital-self.pptxsantosem70
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...Amil Baba Mangal Maseeh
 
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...Sanjna Singh
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1JoEssam
 
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...anilsa9823
 
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة  للشيخ ابن بازشرح الدروس المهمة لعامة الأمة  للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة للشيخ ابن بازJoEssam
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...anilsa9823
 
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Amil Baba Naveed Bangali
 
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRElite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRDelhi Call girls
 
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsThe_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsNetwork Bible Fellowship
 
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptx
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptxThe King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptx
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptxOH TEIK BIN
 
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️soniya singh
 
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...anilsa9823
 

Último (20)

Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practices
 
Part 1 of the Holy Quran- Alif Laam Meem
Part 1 of the Holy Quran- Alif Laam MeemPart 1 of the Holy Quran- Alif Laam Meem
Part 1 of the Holy Quran- Alif Laam Meem
 
Call Girls In Nehru Place 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Nehru Place 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Nehru Place 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Nehru Place 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
English - The Story of Ahikar, Grand Vizier of Assyria.pdf
English - The Story of Ahikar, Grand Vizier of Assyria.pdfEnglish - The Story of Ahikar, Grand Vizier of Assyria.pdf
English - The Story of Ahikar, Grand Vizier of Assyria.pdf
 
Dgital-Self-UTS-exploring-the-digital-self.pptx
Dgital-Self-UTS-exploring-the-digital-self.pptxDgital-Self-UTS-exploring-the-digital-self.pptx
Dgital-Self-UTS-exploring-the-digital-self.pptx
 
Call Girls In CP 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In CP 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In CP 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In CP 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
 
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...
(NISHA) Call Girls Sanath Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esco...
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1
 
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 best call girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
 
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة  للشيخ ابن بازشرح الدروس المهمة لعامة الأمة  للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...
CALL ON ➥8923113531 🔝Call Girls Indira Nagar Lucknow Lucknow best Night Fun s...
 
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
 
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRElite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
 
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_UsThe_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
The_Chronological_Life_of_Christ_Part_98_Jesus_Frees_Us
 
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptx
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptxThe King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptx
The King Great Goodness Part 2 ~ Mahasilava Jataka (Eng. & Chi.).pptx
 
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️
Call Girls in majnu ka tila Delhi 8264348440 ✅ call girls ❤️
 
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...
Lucknow 💋 (Call Girls) in Lucknow | Book 8923113531 Extreme Naughty Call Girl...
 

[UniteKorea2013] Memory profiling in Unity

  • 1. Memory profiling in Unity Kim Steen Riber (kim@unity3d.com)
  • 2. Page Who am I? • Core developer @ Unity • Released games • LIMBO • Watchmen • Total overdose • Unity focus areas • CPU performance • Memory optimizations 09-05-2013 2
  • 3. Page Optimizing your game • FPS • CPU usage (Gamecode, Physics, Skinning, Particles, …) • GPU usage (Drawcalls, Shader usage, Image effects, …) • Hickups • Spikes in framerate caused by heavy tasks (e.g. GC.Collect) • Physics world rebuild due to moved static colliders • Memory • Maintaining small runtime memory on device • Avoid GC Hickups by reducing memory activity • Leak detection 09-05-2013 3
  • 4. Page Performance • Unity Profiler (Pro Feature) • CPU • GPU • Memory usage • New Detailed memory view (Unity 4.1) • Memory reference view (Unity 4.2) 09-05-2013 4
  • 5. Page CPU Profiler • Cpu time consumption for methods • Mono memory activity • Remote Profiling of you game running on target device • Deep profile (editor only) • Detailed view, but large overhead, only usable for very small scenes 09-05-2013 5
  • 6. Page Memory Profiler • Simple and Detailed memory view (Unity 4.1) • Detail view is taken as a snapshot (too expensive for per frame) • Reference view (Unity 4.2) • See where an object is referenced – Good for leak hunting 09-05-2013 7
  • 7. Page Memory Profiler 09-05-2013 8 • Simple memory view • Unity reserves chunks of memory from the os • Mono allocates from a reserved heap • GfxMemory is an estimate
  • 8. Page Mono vs. Unity Memory • Managed - Mono • Script objects • Wrappers for unity objects • Game objects • Assets • Components • … • Memory is garbage collected 09-05-2013 9 • Native - Unity internal • Asset data • Textures • Meshes • Audio • Animation • Game objects • Engine internals • Rendering • Particles • Webstreams • Physics • …..
  • 9. Page Mono Memory Internals • Allocates system heap blocks for allocations • Garbage collector cleans up • Will allocate new heap blocks when needed • Fragmentation can cause new heap blocks even though memory is not exhausted • Heap blocks are kept in Mono for later use • Memory can be given back to the system after a while 09-05-2013 10
  • 10. Page Fragmentation • Memory will get fragmentet if there is a lot of activity 09-05-2013 11 Mono: 16K System: 64K Mono: 32K System: 64K Mono: 32K System: 64K Mono: 48K System: 128K
  • 11. Page Avoiding Allocations • Reuse temporary buffers • If buffers for data processing are needed every frame, allocate the buffer once and reuse • Allocate pools of reusable objects • Create freelists for objects that are needed often • Use structs instead of classes • Structs are placed on the stack, while classes uses the heap • Don’t use OnGUI • Even empty OnGUI calls are very memory intensive 09-05-2013 12
  • 12. Page Avoiding Allocations • Use the CPU profiler to identify mono allocations 09-05-2013 13
  • 13. Page Unity Object wrapper • Some Objects used in scripts have large native backing memory in unity • Memory not freed until Finalizers have run 09-05-2013 14 WWW Decompression buffer Compressed file Decompressed file Managed Native
  • 14. Page Mono Garbage Collection • Object goes out of scope • GC.Collect runs when • Mono exhausts the heap space • Or user calls System.GC.Collect() • Finalizers • Run on a separate thread • Unity native memory • Dispose() cleans up internal memory • Eventually called from finalizer • Manually call Dispose() to cleanup 09-05-2013 15 Main thread Finalizer thread www = null; new(someclass ); //no more heap -> GC.Collect(); www.Dispose(); .....
  • 15. Page Garbage collect and Dispose Demo 09-05-2013 16
  • 16. Page Assetbundle memory usage • WebStream • Compressed file • Decompression buffers • Uncompressed file • Assetbundle • Map of objects and offsets in WebStream • Instantiated objects • Textures, Meshes, etc. 09-05-2013 17
  • 17. Page Assetbundle memory usage • WWW www = new WWW(assetbundle_url); • Loads the compressed file into memory • Constructs decompression buffers (8MB per file) • Decompresses the file into memory • Deallocates the decompression buffers • One decompression buffer of 8MB is reused and never deallocated 09-05-2013 18
  • 18. Page Assetbundle memory usage • AssetBundle ab = www.assetBundle; • Loads the map of where objects are in the webstream • Retains the www WebStream 09-05-2013 19 WebStream Tex Tex Mes h AssetBundle
  • 19. Page Assetbundle memory usage • AssetBundle ab = www.assetBundle; • Loads the map of where objects are in the webstream • Retains the www WebStream 09-05-2013 20 WebStream Tex Tex Mes h AssetBundle Loaded objects
  • 20. Page Assetbundle memory usage • Texture2D tex = ab.Load(“MyTex", typeof(Texture2D)); • Instantiates a texture from the assetbundle • Uploads the texture to the GPU • On editor a system copy is retained (2x memory) • Transferbuffer for the RenderThread will grow to fit the largest Texture or Vertexbuffer (never shrinks) 09-05-2013 21
  • 21. Page Assetbundle memory usage • Deleting the WebStream • www.Dispose(); // will count down the retain count • If not called, finalizers will clean the memory eventually • Deleting the Assetbundle • ab.Unload(false); • Unloads the map and counts down the www retain count • ab.Unload(true); • Will also force unload all assets created from the assetbundle 09-05-2013 22
  • 22. Page Assetbundle memory usage • Removing the loaded objects from memory • ab.Unload(true) • Force unload objects loaded by assetbundle • UnloadUnusedAssets() • Unloads when there are no more references to the object • Use the memory profiler to find remaining references • In Unity 4.1 a reason why a Object is given • In Unity 4.2 specific scripts or Objects referencing a given object are shown 09-05-2013 23
  • 23. Page Assetbundle memory usage • For best memory efficiency do one assetbundle at a time • If more assetbundles are needed at the same time, load one www object into memory at a time, to reduce decompression buffer usage 09-05-2013 24
  • 25. Page Conclusions • Avoid memory activity • Use the memory profiler to monitor memory usage • Load one WWW object at a time • Use Dispose() on objects that derive from IDisposable • Specially if they have a large native memory footprint • Use UnloadUnusedAssets() to clean up assets 09-05-2013 26

Notas del editor

  1. Hi, My name is Kim Steen Riber, and will talk about memory profiling in Unity
  2. I work at unity as a core developer. Before joining Unity I worked on a number of games:At unity I focus primarely on Performace and memory optimizations and making tools to give you the ability to make your games as performant as posibleAnd I like my LEGOs
  3. There are several things you want to adress when optimizing your game. The obvious one ofcourse is Frames per second. This is where the user gets the smooth experience of a game that runs 30 or 60 fps. There are two limiting factors to this, namely The time the game takes on the cpu: that would be things like your gamecode, physics, skinning and other tasks that run on the cpu side. Then there is the gpu side, where things like drawcalls, shader complexity and fillrate matter. Your game will never run faster than the limiting of the 2.One other thing that can degrade the user experience is if the game has a lot of hickups. This will make the game feel stuttering. Things that can cause hickups are long running tasks like garbage collect or physics world rebuilding if for example a static collider is moved.Also memory is an imprtant thing to keep in mind when developing your game. There are 2 main reasons for this: Keeping the runtime memory low, to avoid out of memory – specially on mobile devices, and keeping the memory activity low, to avoid the garbage collecter to kick in
  4. In unity pro we have a tool for this: the unity profiler. This has several focus areas, but I will only talk about the cpu and memory profiler.In unity 4.1 and 4.2 we have added exended functionality to get a more detailed view of your memory usage
  5. The Cpu profiler will let you see the time consumption for each frame. This is displayed in a hierarchy view and can be sorted with the most timeconsuming methods at the top. This will allow you to pinpoint where you should focus your efforts when optimizing. Ther is also a column that tells how much mono memory is allocated by each entry in the profiler. I’ll get to that later.The profiler has the ability to connect to a running player on a device or on your computer. This allows you to profile the actial running game on for example an iphone or in the webplayer. This is done using the dropdown at the top ‘Active Profiler’In the editor you also have the ability to turn on deep profiling. This will instrument all calls in managed code, and will give you are more detailed callgraph. This however has a large performance overhead, so is only feasible on small scenes
  6. The GPU profiler will measure the time taken by individual drawcalls, and lets you drill down into the hierarchy to find the most timeconsuming calls. As with CPU profiling it is best to record the profile when running on device, since the overhead caused by the editor can be significant.
  7. In Unity 4.1 we have made some improvements to the memory profiler which lets you inspect memory at a much finer level than before. There is a simple view and a detailed view. The detailed view is expensive to calculate, so this is implementet as the ability to take a snapshot of the curent state.The detail view will show a list of UnityObjects like Assets and Scene objects, and will also have a calculation of some core areas of unity, like webstreams, mono managed heap, shaderlab and many more.This view will allow you to find memory consuming objects like an uncompressed or excesively large texture acidently added to your game, and focus your efforts on reducing these.In Unity 4.2 we have also implemented a reference view, which allows you to see where a given asset or gameobject is referenced from. This can help you in finding why an asset is not unloaded, by pinpointing where a script is holding a reference to it.
  8. The simple view in the memoryprofiler shows some key numbers in the used memory.It has the Used size and the reserved size of varrious parts of the engine. Both mono and Unity reserves blocks of memory ahead of time and then allocates the requested bytes from these.The GfxDriver usage is based on an estimate calculated from when textures and meshes are uploaded to the driver.
  9. As you could see on the simple memory profiler, The memory in unity is split up in managed and native memory.The managed memory is what is used from Mono, and includes what you allocate in scripts and the wrappers for unity objects.This memory is garbage collected by monoThe native memory is what Unity is allocating to hold everything in the engine. This includes Asset data like tex, mesh, audio, animation. It includes gameobjects and components, and then it covers engine internals like redering , culling, shaderlab, particles, webstreams, files, physics, etc….This memory is not garbage collected, and sometimes needs the UnloadUnusedAssets method call to be freed.
  10. The managed memory used by mono reserves a block of system memory to use for the allocations requested from your scripts. When the heapspace is exhausted, mono will run the garbage collecter to reclaim memory that is no longer being referenced.If more memory is needed mono will allocate more heap space. This will grow to fit the peak memory usage of your application. The garbage collection can be a timeconsuming operation specially on large games. This is one of the reasons to keep the memory activity low.Another reason is that with high memory activity, memory is likely to fragment and the small memory fragments will be unusable and cause memory to growWhen the memory is being freed, mono can in some cases give the heap space back to the system, although this is less likely if memory is fragmentet
  11. So the basics of fragmentation, is that, if there is a lot of allocations where some are retained and some are deleted, memory will get filled with small holes. This will look like free memory, but when trying to make a larger allocation, there is not enough contiguous memory to service that request. This means that mono will have to allocate more heap blocks even though it seams like there is enough free space.
  12. Even though scripting happens i a managed language like C#, there are a number of ways to control the memory and reduce the amount of allocations made by your code.If there are routines in your code that needs some temporary buffers to process data, it is worth considdering to keep these buffers around instead of reallocating them every time the routine is run.Another thing to considder is creating object pools if temporary objects are shortlived and needed often. An example of that could be bullets that are short lived. Having a pool of bullets and then grabbing one when needed and putting it back when done, it will save both the object instantiation and will reduce the allocation activity.A Third thing to considder is using structs instead of classes. When using structs the data is allocated on the stack instead of the heap.Also. Don’t use OnGUI since the GUIUtility will kick in.These are all things that will reduce the memory activity, and thereby reduce the need for garbage collections and fragmentation
  13. This is a small example where on the left side we have a script that needs a databuffer to process some data. It is written without regards to memory usage, as you can see it uses a class for the workdata, and the workbuffer in here is allocated every time the function runs.On the right side, is a version where the Workdata is a struct, and the workbuffer is placed on the class in order to only allocate it once and then reuse the same buffer.On the CPU profiler you can see how the Mono memory usage is excesively high in the allocating script and how a lot of time is used to allocate the workbuffer.In the non allocating script, no memory is allocated, and the script takes no time – like it should since there is not real work done.
  14. Some objects that you can allocate in scripts have large native memory footprints in unity. An example of that is the WWW class which in mono is only a small wrapper, but in Unity it contains some very large allocations. This backing memory is not cleaned up until the finalizers are run, or Dispose is called manually. If this is left to the garbage collector and the finalizers, this memory can potentially live long after the reference is removed from mono.
  15. So the way the garbage collector works is shown here.A reference is removed from mono by setting the reference to null or the object going out of scope. After a while the garbage collector will run, either because the heapspace gets exhausted, or because we manually call GC.Collect()When the memory is collected by the garbagecollector, it is put on a queue for the finalizer. This is handled by another thread, and eventually the finalizer will call Dispose on the object. At this point the unity native memory will be deallocated.To skip this roundtrip, you should call Dispose manually on the object, and then the object will not be given to the finalizers and the memory will be cleaned up imediately. I have a small example that shows this
  16. Garbage collect / Dispose DEMODEMO:Load www, set to null and notice a quick releaseIncrease heap and do the same. Notice memory will not decrease.Use detailed view to show that webstream is still around Do GC.Collect and see memory dropLoad www and use dispose. See that memory drops
  17. When using asset bundles, it is important to know what memory unity has allocated at various stages.For the webstream data there are several buffers depending on the settings of the stream. If it is a compressed stream loading from disk, it will have these buffers: The compressed file, some decompression buffers used by lzma, and the final uncompressed data.The assetbundle created from this www object, allocates a map of objects in the assetbundle and offsets in the decompressed data.When loading objects from the assetbundle, these objects will be created in memory from the decompressed data
  18. When you have your assetbundle url or file, you can load this file asynchroniously by calling new WWW(). This will load the compressed file into memory and start the decompression. The decompression algorithm will need some buffers and these will require a buffer of 8MB. The decompression will construct the unpacked data and after it is done it will deallocate its decompression buffers.To avoid that the 8MB decompression buffer is reallocated for every file being loaded, we keep one buffer in memory that we reuse.Keep in mind that several parallel loads will require more of these buffers to be allocated simultaneously and will result in a large memory spike. To avoid this, load one file at a time instead of starting multiple www requestsFor Assetbundles created with Unity 4.2 we have changed the compression a bit, which has reduced the decompression buffer requirements to half a megabyte instead.
  19. After the file is loaded, you construct the assetbundle from the file by calling www.assetBundle.This will load the map of objects and what offsets they have into the decompressed data. The assetbundle retains a pointer to the WebStream. This will prevent the data from being unloaded even if Dispose is called on the www object.
  20. When objects are loaded from the assetbundle, the data from the webstream is used to construct the requested objects. The assetbundle will hold references to these object.
  21. To loadobjects from the assetbundle, use the Load, LoadAll or mainAsset methods.In the example I will show later, I will load a texture. This will instantiate the texture from the assetbundle data. Then the texture is uploaded to the gpu, and on player builds the main data is then deallocated.On platforms that use our multithreaded renderer the texture is trasfered to the renderthread and the transfer buffer will grow to fit the texture data – I will show that later
  22. When all objects you need have been loaded from the file, you can get rid of the webstream data and the asset bundle.The www object should be deleted by calling Dispose, and not left for the garbage collector to clean up.As long as the Assetbundle is still around, the webstream will not be unloaded, so the assetbundle needs to be unloaded as well, in order to release its handle to the webstream.Unloading the assetbundle can be done by calling unload with either true or false.Calling it with false will release the webstream and delete the map in the assetbundleIf you instead call unload (true) the assetbundle will travers its list of loaded objects and destroy these as well. If there are still references to these objects in scripts, these will be null after this.
  23. When you are done using your assets, you can unload them by still having the assetbundle and calling unload(true) or you can call UnloadUnusedAssets and all assets that are no longer being referenced will be removed from memoryIf an object is not unloaded when calling unload unused assets, it is because it is still being referenced. In the profiler in unity 4.1 you will be able to see if the object is referenced from script or if it for example is marked as HideAndDontSaveIn unity 4.2 we have added additional functionality, so you can see what other objects are holding a references to your object. This should help you to find the references and unload the object
  24. So the most memory efficiency way of loading assetbundles is, If posible, to load just one assetbundle at a time, load what is needed and destroy the assetbundle again. Here is a small example that loads a texture from an assetbundle and when this coroutine exits, both webstream and assetbundle is unloaded and there is no other memory left except the instantiated texture.To, later on get rid of this texture, set the reference to null and call UnloadUnusedAssets.
  25. I have made a small example that shows the assetbundle loading and unloading, and how you can use the memory profiler to see what is happening and what memory is allocated. This is demoed on Unity 4.2 as this has some extra features, that I would also like to show you.DEMO:Load new(unity4.2) www. Notice mem increases. Dispose removes all memory againLoad old(pre 4.2) www. After dispose, there is +8MB left. Use detail view to investigate, and sow the cached buffer.Load www, ab and texture. Detail view – show webstream, assetbundle and texture. Notice the gfxClientBuffer.Dispose www -> nothing happens, because ab has retained handle.Unlead (true). See mem falls to 40MB -> gfxClient and cached decompression bufferLoad all. Unload (false) and Dispose().See detail ->Tex referenced by scriptSet tex= null see that nothing happens. See tex still in detail view, but not referencedCall unloadUnusedAssets. See gfx memory go down and tex is gone from detailed