1 Evaluating effects of memory compressed usage on MeeGo LinuxCon Europe 2011 Anderson Briglia
2 INSTITUTO NOKIA DE TECNOLOGIA INdT Independent and non-profit Research and Development Independent and non-profit Research and Development Institute, founded by Nokia and focused on the generation of Institute, founded by Nokia and focused on the generation of new concepts, products and solutions for areas related to new concepts, products and solutions for areas related to mobile technologies and the internet. mobile technologies and the internet. Manaus Recife INdT INdT Streams: SW SW & UI UI Network Network Technologies Technologies Manufacturing(logistics) Manufacturing(logistics) Service Service experience experience Brasília São Paulo Instituto Nokia Nokia Technology de Tecnologia Institute
3 Agenda Motivation Related work Compcache: some details about the project Experiments using N9 and N900 + MeeGo Final considerations
4 Why compressed memory? Generally, memory is scarce. Hardware changes bring more co$ts. A software solution can relief the memory scarcity. Flash storage suffers from wear-leveling issues, so its useful if we can avoid using them as swap device.
5 Related work 1993 Douglis with first comp. cache implementation Kaplan with new adaptive scheme. Following the same scheme, Rodrigo Castro released an implementation with new compressed storage structures approach and new adaptive re-sizing approach. It was for 2.4.x Linux kernel. CRAMES Compressed RAM for Embedded Systems.
6 Compressed Cache Previous version Changes to the swap write path, page fault handler and page cache lookup functions. Intrusive nature.
7 Compressed Cache Ramzswap module RAM based block device used as swap disk. Swapped pages are compressed and stored in memory itself. Requested pages are decompressed before swapped-out.
8 Compressed Cache Implementation design Far less intrusive than previous approach. Do not compress page cache (filesystem backed) pages. Compress anonymous pages only. Individual components: o LZO compressor. o xvmalloc memory allocator. o compcache block device driver: ramzswap. swapon /dev/ramzswap0
9 Compressed Cache Memory management How manage the variable size of the compressed chunks? How reduce the fragmentation?
10 Compressed Cache Memory management xvmalloc: O(1) malloc/free. Very low fragmentation as presented on all tests. Can use highmem. Non-standard allocator interface.
11 Compressed Cache Limitations ramzswap can never know when a compressed page is no longer required. Swap discard mechanism: BIO_RW_DISCARD If there is no swap operations the stale pages will remain. ramzswap can simply forward uncompressible pages to a backing swap disk, but it cannot swap out memory allocated by xvmalloc.
12 Test platforms N9 + Harmattan o has ramzswap as default swap device: ~ 256 MB o Swappiness = 30 o RAM 1GB N900 running MeeGo by Community o has MMC block device as default swap device: ~ 75 MB o RAM 256 MB Tests consists in memory allocation speed (fillmem, scan utilities), and low memory situations: multiple applications running.
13 Compressed Cache Experiments Is ramzswap overhead affecting memory allocation speed? Is ramzswap enabling other use cases when memory consumption is critical?
14 N9 Experiments Performance tests Memory allocation speed Memory consumption Memory behavior when applications are running and ramzswap is being used or not
15 N9 Experiments Performance test Time to allocate 550 MB Swappiness = 60 Real swap + ramzswap No ramzswap Time (s)
16 N9 Experiments Compressed memory after 550 MB allocated No ramzswap Default config Swappiness = Number of stored pages Saved memory
17 N9 Experiments Memory consumption behavior 8 browsers instances Calendar Video player Music player
21 N9 Experiments Some conclusions Memory consumption Default configuration Good responsiveness but the video did not play. No swap After the six browser instance the responsiveness was decreasing and the video player did not start. With ramzswap Responsiveness ok, all applications started and worked properly.
22 N900 Experiments Performance tests Memory allocation speed Memory consumption Memory behavior when applications are running and ramzswap is being used or not
23 N9 Experiments Performance: Time to allocate 90 MB Swappiness = 60 Real swap + ramzswap No ramzswap Time (s)
24 N900 Experiments Performance tests Time to allocate 90 MB System was able to allocate 90 MB bunch of memory in three different swap configurations. Swappiness = 60 and ramzswap size = 15% of total memory seems to be the best choice.
25 N900 Experiments Memory consumption behavior 8 browsers instances Video player Photo gallery
27 N900 Experiments Results Memory consumption Default configuration No responsiveness after video play, not possible to finish the test. With ramzswap (swappiness = 30 or 60) No possible to finish the test as well. The device rebooted. Ramzswap + real swap (mmc blk device) Best choice. Ramzswap was configured to have higher priority. MMC blk device as second swap area.
28 Final considerations As presented, memory compressing is an alternative for embedded and memory limited devices. The newer Compressed Cache version (using ramzswap), is pretty mature and had abandoned the intrusive nature from previous version.
29 Final considerations N9 experiments showed that the best choice is to combine the fs back storage swap and the ramzswap. Its default configuration already set this. The default value for swappiness on N9 is 30. Maybe we should review this since we could have more pages going earlier to compressed memory, increasing the performance.
30 Final considerations N900 experiments showed that the ramzswap usage could bring more benefits than the current configuration. Before ramzswap load, we need do configure the amount of memory used since it is not a good idea to have big ramzswap partitions.
31 Presentation resources Compcache project website: LWN.net article about in-memory compressed swapping: Documentation about Virtual Memory Management on kernel.
Monitoring the Microsoft Windows Server System with PATROL - a Best Practices Guide Contents Introduction...1 Establishing a Baseline...1 The Operating System...1 CPU...2 Memory...4 Network...7 Disk...8
Contents Introduction...1 Overview of x86 Virtualization...2 CPU Virtualization...3 The Challenges of x86 Hardware Virtualization...3 Technique 1 - Full Virtualization using Binary Translation...4 Technique
Kaseya Performance And Best Practices Guide Authors: Jacques Eagle Date: Thursday, April 29, 2010 1 P a g e Contents Introduction... 5 B.0 - The Basics... 6 B.1 - Hot Fixes... 6 B.2 64 bit versus 32 bit
Run-Time Dynamic Linking for Reprogramming Wireless Sensor Networks Adam Dunkels, Niclas Finne, Joakim Eriksson, Thiemo Voigt Swedish Institute of Computer Science, Box 1263, SE-16429 Kista, Sweden email@example.com,
Annals of Telecommunications manuscript No. (will be inserted by the editor) Virtual Networks: Isolation, Performance, and Trends Natalia C. Fernandes Marcelo D. D. Moreira Igor M. Moraes Lyno Henrique
INTRODUCTION TO LINUX CLUSTERING DOCUMENT RELEASE 1.1 Copyright 2008 Jethro Carr This document may be freely distributed provided that it is not modified and that full credit is given to the original author.
Table of Contents 1 Introduction 1.1 Welcome 1.2 What Makes Data Rescue Different? 1.3 Latest Version of the Software 1.4 Contact Prosoft Engineering 1.5 About the Demo 1.6 System Requirements 1.7 General
www.freeraidrecovery.com Practical issues in DIY RAID Recovery Based on years of technical support experience 2012 www.freeraidrecovery.com This guide is provided to supplement our ReclaiMe Free RAID Recovery
Performance Evaluation of Online Backup Cloud Storage Xiao Zhang School of Computer Science Northwestern Polytechnical University 127 Youyi xi Road, Xi an Shaanxi China firstname.lastname@example.org Wan Guo School
David Chappell October 2012 WINDOWS AZURE DATA MANAGEMENT CHOOSING THE RIGHT TECHNOLOGY Sponsored by Microsoft Corporation Copyright 2012 Chappell & Associates Contents Windows Azure Data Management: A
JIOS, VOL. 35, NO. 1 (2011) SUBMITTED 02/11; ACCEPTED 06/11 UDC 004.75 Comparison of Cloud vs. Tape Backup Performance and Costs with Oracle Database University of Ljubljana Faculty of Computer and Information
Fault-tolerant and scalable TC splice and web server architecture Manish Marwah Shivakant Mishra Department of Computer Science, University of Colorado, Campus Box 0430, Boulder, CO 80309-0430 Christof
Best Practices Guide McAfee epolicy Orchestrator for use with epolicy Orchestrator versions 4.5.0 and 4.0.0 COPYRIGHT Copyright 2011 McAfee, Inc. All Rights Reserved. No part of this publication may be
HP D2D NAS Integration with HP Data Protector 6.11 Abstract This guide provides step by step instructions on how to configure and optimize HP Data Protector 6.11 in order to back up to HP D2D Backup Systems
A Survey on Virtual Machine Security Jenni Susan Reuben Helsinki University of Technology email@example.com Abstract Virtualization plays a major role in helping the organizations to reduce the operational
Introduction to InfiniBand for End Users Industry-Standard Value and Performance for High Performance Computing and the Enterprise Paul Grun InfiniBand Trade Association INTRO TO INFINIBAND FOR END USERS
Installation Guide for contineo Sebastian Stein Michael Scholz 2007-02-07, contineo version 2.5 Contents 1 Overview 2 2 Installation 2 2.1 Server and Database....................... 2 2.2 Deployment............................
SATARAID5 Management Software User s Guide Document Number: MAN-000SR5-000 Revision 1.30 Copyright 2006, Silicon Image, Inc. All rights reserved. No part of this publication may be reproduced, transmitted,
Journal-guided Resynchronization for Software RAID Timothy E. Denehy, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau Department of Computer Sciences, University of Wisconsin, Madison Abstract We
3ware SATA+SAS Controller Card Software User Guide User Guide Supports the 9750-4I and 9750-8I Models PN: 45414-00, Rev. A November 2009 Document Description Document 45414-00, Rev. A. November 2009. This
The HAS Architecture: A Highly Available and Scalable Cluster Architecture for Web Servers Ibrahim Haddad A Thesis in the Department of Computer Science and Software Engineering Presented in Partial Fulfillment