Memory management. Linux Memory Management Total memory available for processes = real memory + paging space - 1MB. First megabyte of real memory is used.

Slides:



Advertisements
Similar presentations
COMPUTERS: TOOLS FOR AN INFORMATION AGE Chapter 3 Operating Systems.
Advertisements

Va-scanCopyright 2002, Marchany Unit 8 – Solaris File Systems Randy Marchany VA Tech Computing Center.
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
11 BACKING UP AND RESTORING DATA Chapter 4. Chapter 4: BACKING UP AND RESTORING DATA2 CHAPTER OVERVIEW Describe the various types of hardware used to.
Backup & Restore Objectives –to understand Unix backup strategies Contents –why have backups –backup terminology –backup media –backup utilities –issues.
Exploring the UNIX File System and File Security
Lesson 22 – Introduction to Linux Systems Administration.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Chapter 7: Configuring Disks. 2/24 Objectives Learn about disk and file system configuration in Vista Learn how to manage storage Learn about the additional.
Guide To UNIX Using Linux Third Edition
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
®® Microsoft Windows 7 for Power Users Tutorial 10 Backing Up and Restoring Files.
Guide to Linux Installation and Administration, 2e1 Chapter 13 Backing Up System Data.
Standard Operating and Maintenance Procedures
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Windows Server 2003 資料備份與還原 林寶森
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
Backups in Linux Ning Zhu Class presentation. Introduction The dump and restore commands are the most common way to create and restore from backups in.
Backup policies Or - how not to get annoyed when you accidentally delete stuff. Warning - this does get a little technical.
Chapter 11 Compression, System Backup, and Software Installation.
LAN / WAN Business Proposal. What is a LAN or WAN? A LAN is a Local Area Network it usually connects all computers in one building or several building.
Linux+ Guide to Linux Certification
Backup Techniques Objectives –to illustrate practical application of backup utilities Contents –using dd, a direct device access command –manipulating.
1 CSC2405: System Administration Week 5 -- Backup what to do? where to? which way? Tools?
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Drive Imaging Joe Cicero Northeast Wisconsin Technical College.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Chapter 4 Solving Data Backup Challenges Prepared by: Khurram N. Shamsi.
Chapter Fourteen Windows XP Professional Fault Tolerance.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Backup Track SA-E AfNOG workshop May 15, 2009 Cairo, Egypt (Slides by Phil Regnauld)
Linux Operations and Administration
Maintaining File Services. Shadow Copies of Shared Folders Automatically retains copies of files on a server from specific points in time Prevents administrators.
Day 8 Exporting Displays Cronjobs Mount. Chapter 5 Chapter 5 talks about X windows. –You should read the chapter. –However, you do not need to pay particular.
1 Maintain System Integrity Maintain Equipment and Consumables ICAS2017B_ICAU2007B Using Computer Operating system ICAU2231B Caring for Technology Backup.
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
Chapter 6: Linux Filesystem Administration
Chapter Two Exploring the UNIX File System and File Security.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
1 Objectives Manage and install new file systems.
Backups CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Installation Objectives –to be aware of Unix installation issues Contents –installing the system –options and packages –disk layout –the swapfile –third.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Computer Systems Week 14: Memory Management Amanda Oddie.
Cosc 4750 Backups Why Backup? In case of failure In case of loss of files –User and system files Because you will regret it, if you don’t. –DUMB = Disasters.
1 Backups Part of a Systems Administrators job is maintaining the integrity of the system. This does not mean that she is expected to prevent anything.
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
CSCI 330 UNIX and Network Programming Unit XX: Linux Administration.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
Materi managing user & groups, file system Managing Software Packages and File Systems The Complete Guide to Linux System Administration Chapter 10.
Linux Filesystem Administration
tar: The tape archive program _______________________ Amber Jain IC-2K7-05 _______________________.
File-System Management
Filesystem Management and Backups
Cairo, Egypt (Slides by Phil Regnauld)
Backing Up Your Computer
UBUNTU INSTALLATION
Introduction to Computers
Operating System Module 1: Linux Installation
Lecture 43 Syed Mansoor Sarwar
Chapter 10 Archives and Backups.
Presentation transcript:

Memory management

Linux Memory Management Total memory available for processes = real memory + paging space - 1MB. First megabyte of real memory is used for kernel program and kernel data -> not for applications. –A bzImage kernel might use more than 1 MB. Rest is used for processes. Pages in real memory will be paged out to disk if necessary. Unused real memory will be used for disk caching. The maximum amount of usable memory (on intel-32) is 4GB (if kernel supports it)

Example: Lightly Loaded System On a lightly loaded system –All processes will fit in real memory –Real memory will be left which will be used to cache data on disk to reduce data access time

Example: Heavily Loaded System On a heavily loaded system –less often used process will be swapped out to disk ( paging space) –Only most often used processes will be in memory Linux uses a very efficient and effective, but non-tunable algorithm to decide whether to give up caching space or to swap out processes if real memory becomes full.

Creating Paging Space We need an empty partition –Create with fdisk –Partition type 82 (Linux swap) Create paging space in that partition mkswap -c /dev/hda3 Activate paging space swapon /dev/hda3 –Add to /etc/fstab Deactivating paging space is done with swapoff –In real time, no reboot necessary. –Only if enough memory is available.

Creating Paging Space Paging can also be done to a file (less efficient) –Create a large file and use it as if it were a partition

Useful Commands top : displays memory, CPU process statistics continuously uptime : displays system uptime + load free : displays memory statistics ps : displays processes sync : flushes the cache to disk xload : graphically displays system load

Backup & Restore

Why Backup? Data is very important –Expensive to create –Can it be re-created Disaster recovery –Hardware failure –Software failure –Damage due to installation or repair –Accidental deletion –Malicious users or break

Why Backup? (Cont’d) Long-term archive System Administration –Transfer of data between systems –Reorganizing file system –Defragmentation –Checkpoint before and after an upgrade

Why Restore? Recover files Compare versions of files Recover system after disaster Restore archived data Shrink file systems

Three Types of Backup System backup –Preserves system directories and files Full backup –Preserves all user data and configuration files Incremental backup –Records changes since last full backup or last incremental backup –very fast, but takes more time to restore –must be used carefully –Needs more tapes

Backup Strategy (1) Normal Working System System Backup -> Full Backup -> Incremental Backup -> Incremental Backup -> Incremental Backup ->... Note: Each organisation has its own special considerations concerning data to take into account.

Backup Strategy (1) In practice you would want to exclude certain directories from the backup process. Some of the directories being –/tmp –/var/tmp –/usr/tmp Not backing up these directories saves space on the archives

Backup Strategy (1) Do not backup /proc even if it exists on your system. The /proc filesystem is not a disk file system but is a way for the kernel to provide you with information about the operating system and system memory. You cannot restore it later.

Backup Strategy (2) Back up everything which has changed since last system backup: –All user data –All changed system files –All changed application files Do not back up: –Unchanged application files –Software quickly loaded from tape

Incremental Backup Scheme Level 0 Backup- Sun (Full dump) Level 9 Backup- Mon (Incremental dump) Level 8 Backup- Tues (Incremental dump) Level 7 Backup- Wed (Incremental dump) Level 6 Backup- Thur (Incremental dump) Level 5 Backup- Fri (Incremental dump) Level 4 Backup- Sat (Incremental dump)

Backup Devices Tape drive CD-ROM Hard disk Diskette drive ZIP drive Network

Backup Commands tar –Widely available –Excellent for transferring data between platforms –Beware of empty directories (-d option) cpio –Widely available –Difficulties with many symbolic links

Backup Commands dd –Not a real backup command –Copies are exact images –Can be used for conversions

tar command Traditional UNIX tape archive command –Performs backup and restore Backup with tar: tar cvf [files | dir] tar cvf /dev/fd0 /home tar cvf /mnt/hda8/filename.tar /home

tar command Restore with tar: tar -xvf device [files|dir] tar -xvf /dev/fd0 "/home/ j*" List contents of a tar backup: tar -tvf

cpio Command Common UNIX backup command Backup with cpio: cpio -ov > find /home | cpio -ov > /dev /fd0

cpio Command Restore with cpio: cpio -iv[-dum] [files] cpio -ivdum " /home/ j*" < /dev/fd0 List contents of a cpio backups: cpio -itv cpio itv < /dev/fd0

dd Command Not a real backup command Converts and copies files –dd reads the infile parameter, does the specified conversions –Copies the converted data to the outfile parameter

dd Command Examples: –Makes a backup of /etc/passwd dd if = /etc/passwd of = /dev /rfd0 –Displays the long list of the current directory in uppercase ls -l | dd conv = ucase