selective main memory compression by identifying program phase

13

Click here to load reader

Upload: 915086731

Post on 29-Jun-2015

32 views

Category:

Technology


0 download

DESCRIPTION

Selective Main Memory Compression by identifying Program Phase Changes

TRANSCRIPT

Page 1: Selective main memory compression by identifying program phase

Selective Main Memory Compression by identifying Program Phase Changes

Doron Nakar and Shlomo Weiss

Tel Aviv University

Reported by jiang

Page 2: Selective main memory compression by identifying program phase

Background

During a program’s runtime, the stack and data segments of the main memory often contain much redundancy. Compress these memory can offer obvious benefits of increasing the overall memory availability and reducing disk accesses.

Page 3: Selective main memory compression by identifying program phase

Background

•Work by this paperPresents a new approach to compress memory selectively by not compressing all the memory all of the time.Identify the working Sets which exhibit good spatial locality, and leave it uncompressed for faster access.

Page 4: Selective main memory compression by identifying program phase

4

Main Idea

The runtime program is divided into windows of fixed size.After a window finishes executing, the segments executed will be hashed in to a array by setting the corresponding bit to ‘1’.

Seg 0

Seg 1

.

.

.

Seg k

Bit 0

Bit 1

.

.

.

Bit n

Instructions window Hash Array

.

Page 5: Selective main memory compression by identifying program phase

Main Idea

•Then the current hash array will be compared with previous array to get a difference factor δ .

=

•Lower δ value means less difference, as well as better locality, which means contain much redundancy to compress.

•Pages that are in the program’s page table but not in its working set is the candidate to be compressed.

Page 6: Selective main memory compression by identifying program phase

Flowchart

Run “Window size” instructionsmark the hash array

record segment address

Calculate δ

δ small enough ?

Replace previous table to current

Trigger compression

Clear current table

Page 7: Selective main memory compression by identifying program phase

Locality algorithm evaluation

A surprise occurs when if neither bit is on or if the address stored in the current hash table doesn’t match the requested address. More surprises mean less spatial locality.

Page 8: Selective main memory compression by identifying program phase

Locality algorithm evaluation

“gzip” allocates and clears 60 Mbytes of space on the heap but never uses it. And it causes abnormally high compression ratios due to many pages that contain only zeros.

we had to disregard pages that contain only zeros and not take them into account in the compression results.

Page 9: Selective main memory compression by identifying program phase

9

Compression method

• Hash array can be compared to get the locality ratio, however ,to get the addresses accessed, we need expand hash array by adding additional information to determine, during a stable phase of the program, which pages are unused and may be compressed.

Bit 0

Bit 1

.

.

.

Bit n

.

Expand

Bit 0

Bit 1

.

.

.

Bit n

.

Address

Address

.

.

.

Address

.

Page 10: Selective main memory compression by identifying program phase

Compression method

• Compressing all the pages that are in the program’s page table but not in its working set(hash table).

0

1

1

.

.

0.

Null

Address

Address

.

.

Null.

Not to be compressed!

Page 11: Selective main memory compression by identifying program phase

PERFORMANCE RESULTS

1. At the end of every instruction window: the compression ratio is calculated.

2. The percentage of memory in compressed form.

3. The number of decompressed pages per instruction window

Page 12: Selective main memory compression by identifying program phase

PERFORMANCE RESULTS

eon: Average δ Value is 0.0760

crafty: Average δ Value is 0.0200

Page 13: Selective main memory compression by identifying program phase

Thanks for your appreciation!