WO2016122585A1 - Modifying characteristics of a memory segment - Google Patents
Modifying characteristics of a memory segment Download PDFInfo
- Publication number
- WO2016122585A1 WO2016122585A1 PCT/US2015/013748 US2015013748W WO2016122585A1 WO 2016122585 A1 WO2016122585 A1 WO 2016122585A1 US 2015013748 W US2015013748 W US 2015013748W WO 2016122585 A1 WO2016122585 A1 WO 2016122585A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory
- segment
- memory segment
- application
- running software
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C7/00—Arrangements for writing information into, or reading information out from, a digital store
- G11C7/10—Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3034—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
Definitions
- Figure 1 is a diagram illustrating a computing environment suitable for implementing aspects of a memory segment configuration system according to one example.
- Figure 2 is a diagram illustrating an address space and segment list of an application according to one example.
- Figure 3 is a block diagram illustrating modules of a memory segment configuration system according to one example.
- Figure 4 is a flow diagram illustrating a method of configuring memory segments of a running application according to one example.
- Figure 5 is a flow diagram illustrating a method of configuring memory segments of a running application according to another example.
- Figure 6 is a flow diagram illustrating a method of configuring memory segments of a running application using a database of application types according to one example.
- Figure 7 is a flow diagram of a method for gathering memory access statistics using a PEBS (precise-event-based sampling) infrastructure according to one example.
- PEBS precise-event-based sampling
- Figure 8 is a flow diagram of a method for gathering memory access statistics by monitoring page faults according to one example.
- Figure 9 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to one example.
- Figure 10 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to another example.
- Figure 1 1 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to yet another example.
- Figure 12 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application, which combines aspects of the methods shown in Figures 9-1 1 , according to one example.
- One example is directed to the dynamic adaptation of an operating system address space, and more particularly to dynamically changing an operating system address space with memory segments with different characteristics.
- One specific example is directed to a mechanism to dynamically, at runtime, change individual memory segment configurations by determining an improved configuration of the segments from tracked past behavior, and by changing the configurations through copying segments to newly configured segments either dynamically or on demand.
- Adapting characteristics of segments of an application's address space improves application performance by having individual segments configured to have improved characteristics.
- Figure 1 is a diagram illustrating a computing environment 10 suitable for implementing aspects of a memory segment configuration system according to one example.
- the computing system or computing device 10 includes one or more processing units 12 and system memory 14.
- memory 14 may be volatile (such as RAM), non-volatile (such as ROM, flash memory, Memristive, phase change, and spin transfer torque memory, etc.), or some combination of the two.
- Computing device 10 may also have additional or different
- computing device 10 may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tape.
- additional storage is illustrated in Figure 1 by removable storage 16 and non-removable storage 18.
- Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any suitable method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
- Memory 14, removable storage 16 and non-removable storage 18 are all examples of computer storage media (e.g., non-transitory computer-readable storage media storing computer-executable instructions that when executed by at least one processor cause the at least one processor to perform a method).
- Computer storage media includes RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Any such computer storage media may be part of computing device 10.
- computing device 10 The various elements of computing device 10 are communicatively coupled together via one or more communication links 15.
- Computing device 10 also includes one or more communication connections 24, such as network connections, that allow computing device 10 to communicate with other computers/applications 26.
- Computing device 10 may also include input device(s) 22, such as keyboard, pointing device (e.g., mouse), pen, voice input device, touch input device, etc.
- Computing device 10 may also include output device(s) 20, such as a display, speakers, printer, etc.
- Figure 1 and the above discussion are intended to provide a brief general description of a suitable computing environment in which one or more examples may be implemented. It should be understood, however, that handheld, portable, and other computing devices of all kinds are contemplated for use. Figure 1 thus illustrates an example of a suitable computing system
- the computing system environment 10 in which the examples described herein may be implemented, although as made clear above, the computing system environment 10 is one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the examples. Neither should the computing environment 10 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the example operating environment 10.
- a memory segment configuration system 300 is stored in system memory 14.
- system 300 creates different memory segments of an application's address space with different
- Each memory segment has the following properties: (1 ) an address range that the memory segment covers; (2) a segment page size; and (3) identification of a backing memory region.
- the segment page size is defined by the hardware the system is running on.
- the backing memory region is a range of physical memory that is used to back the segment's contents.
- the backing memory region can have different characteristics based on the type of memory it is in.
- Memory segment configuration system 300 is described in further detail below with reference to Figures 2-4.
- FIG. 2 is a diagram illustrating an address space (AS) 202 and segment list 206 of a software application ("Application A") according to one example.
- the address space 202 for Application A includes memory segments 204(1 )-204(5) (collectively referred to as memory segments 204), and the segment list 206 includes memory segment characteristics 208(1 )-208(5) (collectively referred to as memory segment characteristics 208).
- the memory segment characteristics for each memory segment 204 include a base address, a segment size, a page size, and an identification of a backing memory region.
- Memory segment 204(1 ) (“segment #2”) is a stack for Application A and includes memory segment characteristics 208(3).
- Memory segment 204(2) (“segment #4") is one of the larger segments and includes memory segment characteristics 208(5).
- Memory segment 204(3) (“segment #3") is one of the larger segments and includes memory segment characteristics 208(4).
- Memory segment 204(4) (“segment #1 ”) is a data section for Application A and includes memory segment characteristics 208(2).
- Memory segment 204(5) (“segment #0”) is a text section for Application A and includes memory segment characteristics 208(1 ).
- Memory segments 204(1 ), 204(3), 204(4), and 204(5) are backed by system RAM 210 as represented by segments 214(1 ), 214(3), 214(4), and 214(5), respectively, and memory segment 204(2) is backed by system non-volatile memory (NVM) 212, as represented by segment 214(2), and uses larger pages.
- NVM non-volatile memory
- One example of the memory segment configuration system 300 shown in Figure 2 creates different memory segments, such as memory segments 204, of an application's address space, such as address space 202, with different characteristics, such as the characteristics 208, and changes the characteristics of the memory segments based on memory access patterns observed after their creation.
- FIG. 3 is a block diagram illustrating modules of a memory segment configuration system 300 according to one example.
- System 300 includes an application monitoring module 302, an application identification module 304, a memory segment identification module 306, a memory segment characteristics identification module 308, and a memory segment characteristics modification module 310.
- system 300 is implemented in an operating system, and performs dynamic changes in the characteristics of address space segments based on the past knowledge of the use of the segments, such as the sparsity and contiguity of segments, as well as spatial and temporal access patterns.
- the functionality of system 300 is exposed to the applications themselves, which allows each application to autonomously modify its address space to account for previously observed access patterns.
- system 300 is implemented in an OS level service that observes the applications' behavior and then adjusts their address space characteristics based on the observed access patterns. It is noted that the functionality of the modules in system 300 can be combined into a single module, or can be combined or broken apart in any other desired manner. Each module in system 300 according to one example is a combination of hardware and software executing on that hardware to provide a given functionality.
- Figure 4 is a flow diagram illustrating a method 400 of configuring memory segments of a running application according to one example.
- system 300 ( Figure 3) performs method 400.
- application monitoring module 302 monitors running applications and gathers memory statistics.
- application identification module 304 identifies one or more of the running applications for adjustment of memory segment
- a fitness number is calculated for each of the running applications.
- One example fitness number for an application, p can be obtained using the following
- nvm (p) Number of NVM references
- s mem (p) Number of stall cycles on memory references
- the fitness equation includes three terms.
- the first term (multiplied by coefficient Co) is the TLB (translation lookaside buffer) miss ratio of application, p, and represents the fitness of the current selection of page sizes, as bad page size selections will lead to higher miss ratios.
- the second term (multiplied by coefficient c-i ) is the NVM read ratio, and represents the fitness of NVM usage.
- the NVM read ratio will be high if there are mostly NVM reads, which is an indication to consider caching any read-heavy NVM- backed buffers in DRAM.
- the third term (multiplied by coefficient c 2 ) is the ratio of CPU stalls caused by memory references, and represents the fitness of the current memory locality of the memory segments of application, p.
- a high stall ratio indicates that one or more segments of application, p, are not local to the computation on those segments.
- the application(s) with the lowest fitness number(s) is/are then selected at 404 in method 400 by application identification module 304 for further consideration.
- memory segment identification module 306 performs a detailed observation of the memory references for each memory segment of the selected application, and identifies memory segments of the application to be adjusted.
- module 306 uses Equation I on the observed per-segment data to generate per-segment fitness numbers, and identifies memory segments at 406 based on the per-segment fitness numbers (e.g., memory segments that have bad fitness numbers).
- memory segment characteristics identification module 308 identifies improved segment characteristics for the segments identified at 406. In another example, subsequent iterations are performed over the candidate sections only rather than over all applications, and then a periodic switch is performed between the two approaches.
- memory segment characteristics modification module 310 adjusts segment characteristics of memory segments identified at 406 using the improved segment characteristics identified at 408.
- Example memory segment characteristics that may be adjusted at 410 include page size, Non-Uniform Memory Access (NUMA) region, memory type (e.g. RAM vs.
- NUMA Non-Uniform Memory Access
- NVM NVM
- NVM locality NVM
- Examples of dynamic changes in the characteristics of address space segments that are made at 410 in method 400 based on observed access patterns include, but are not limited to, the following: (1 ) For sparsely populated segments (i.e., most of the segment is not used), one example adjusts the characteristics of the segment to use smaller pages, which allows the segment to be populated in a more fine-grained fashion and improves the performance of the actual populating; (2) For large segments whose access pattern
- the database can be made available to any application in the system using various techniques (e.g., providing the database as a system service or a shared library).
- Figure 5 is a flow diagram illustrating a method 500 of configuring memory segments of a running application according to another example.
- Methods 400 and 500 can be used to adjust address space characteristics online (i.e. while the application is running).
- memory access statistics for a running application are gathered for a user-defined amount of time.
- an application type for the running application is identified based on the statistics gathered at 502.
- improved memory segment characteristics for the identified application type are identified.
- the identified improved characteristics are applied to one or more memory segments of the running application.
- the method 500 waits for a user-defined timeout period, and then returns to 502.
- Method 500 (due to the fact that it is executed periodically) can deal with applications whose type changes in phases without any modifications as well as adjusting the characteristics of individual memory segments without having to change the characteristics of the whole address space.
- Another example for applying the improved characteristics is to employ a system where applications provide metadata that includes their application type as described above, or a list of memory segments and characteristics for selected segments which are applied when the application is launched.
- Figure 6 is a flow diagram illustrating a method 600 of configuring memory segments of a running application using a database of application types according to one example.
- the method 600 starts at 602.
- the method 600 determines whether an auto mapping method for adjusting memory segment characteristics is enabled for the running application. If it is
- the method 600 determines at 604 that the auto mapping method is not enabled, the method 600 returns to 604 to repeat the determination. If it is determined at 604 that the auto mapping method is enabled, the method 600 moves to 606 to gather memory access statistics for the running application. At 608, a determination is made whether enough data has been gathered at 606. If it is determined at 608 that enough data has not been gathered, the method 600 returns to 606 to gather additional memory access statistics. If it is determined at 608 that enough data has been gathered, the method 600 moves to 610 to identify an application type for the running application based on the statistics gathered at 606.
- Database 612 is a database of application types with associated best characteristics for each application type.
- Database 612 includes data gathered from benchmarking a representative set of applications covering all application types which are extractable from memory access statistics.
- a conversion method is executed to convert one or more memory segments of the running application from their original
- a recheck threshold it is determined whether a recheck threshold has been reached. If it is determined at 618 that the recheck threshold has not been reached, the method 600 returns to 618 to repeat the determination. If it is determined at 618 that the recheck threshold has been reached, the method 600 returns to 606 to repeat the process described above.
- One aspect of some examples described herein involves observing the behavior of a running application to produce statistics regarding the
- PEBS precise-event-based sampling
- the PEBS Data Address profiling enhances the performance counters that count memory accesses by providing a snapshot of the processor state at the point of the memory access. This snapshot includes the accessed address for each recorded memory access.
- FIG. 7 is a flow diagram of a method 700 for gathering memory access statistics using a PEBS infrastructure according to one example.
- page size is the attribute that is being improved.
- a buffer that can be used by the PEBS infrastructure to save the records containing the processor snapshot state is allocated.
- two of the programmable performance counters are configured to use PEBS with data address profiling.
- the PEBS infrastructure is configured to use the buffer allocated at 702.
- a first one of the performance counters is configured to count events of the type MEM_UOPS_RETIRED.ALL_LOADS
- a second one of the performance counters is configured to count events of the type MEM_UOPS_RETIRED.ALL_STORES.
- program execution is started (or resumed) for a short, fixed amount of time.
- the performance counters are disabled.
- all data addresses from PEBS records are collected.
- all of the collected data addresses are sorted into buckets according to the 4KiB page the addresses are in.
- the example method 700 is specific to lntel®'s x86 architecture, and, as mentioned above, is based on a scenario where the page size of segments is being improved. Thus, at 716, all data accesses are sorted according to the smallest possible pages in the system (x86 64bit architecture allows pages of 4KiB, 2MiB and 1 GiB).
- the number of addresses in each bucket is counted, and a map of 4KiB pages to number of accesses of that page is created. Leveraging the information generated by method 700, access statistics for each memory segment of an application's address space can be generated by looking up all pages corresponding to a memory segment in the map created at 718.
- FIG. 8 is a flow diagram of a method 800 for gathering memory access statistics by monitoring page faults according to one example.
- the method 800 keeps track of each handled page fault.
- the method 800 returns to 802.
- Method 800 allows the creation of statistics on segment access patterns without the need for specialized hardware at the cost of some performance. The performance cost stems from the fact that page faults are being artificially introduced into the system to count accesses to different regions of the address space.
- a page type as used herein refers to all characteristics of the segment such as page size, persistence, NUMA region and others.
- FIG. 9 is a flow diagram illustrating a method 900 of dynamically modifying characteristics of memory segments of a running application according to one example.
- a segment to be converted is made to be read-only.
- the data stored in the segment's initial backing memory region is copied to a new backing memory region with the desired characteristics.
- the segment is updated to point to the new backing memory region created at 904.
- the method 900 frees up the initial backing memory region.
- write accesses to the segment may fail and the application may be stalled until the conversion is completed.
- Method 900 can be modified by recognizing conversions that do not involve the data being copied to a different backing region (e.g., changing the page size of a segment while keeping the other characteristics), and applying a conversion procedure for such segments.
- the conversion procedure (shown in Figure 10) may have further preconditions that are dictated by the underlying hardware (e.g., how the address space segment and the backing memory region are aligned for commonly available paging memory management units) and may fall back on method 900 if those preconditions are not met.
- Figure 10 is a flow diagram illustrating a method 1000 of dynamically modifying characteristics of memory segments of a running application according to another example.
- preconditions are checked to determine if the method 1000 can be applied. If the preconditions are not satisfied, method 900 ( Figure 9) is used.
- the method 1000 creates new segment metadata parallel to application execution.
- the application's segment metadata for the segment under conversion is atomically switched to the segment created at 1004.
- An advantage of method 1000 is that it should not stall the application even if it writes to the segment during the conversion because the data is not copied.
- Figure 1 1 is a flow diagram illustrating a method 1 100 of dynamically modifying characteristics of memory segments of a running application according to yet another example.
- segment density of a segment to be modified is checked to determine if the segment density is above a given threshold. If the segment density is above the threshold, method 900 ( Figure 9) is used. If the segment density is not above the threshold, the method 1 100 continues.
- a new backing region for the segment is created with the desired characteristics.
- copy-on-reference mappings from old to new backing regions are created using a copy-on-reference method.
- the method 1 100 atomically updates the segment to use the new mappings.
- the old backing region is freed.
- Method 1 100 could also employ prefetching techniques to copy the data in the segment in parallel to application execution.
- Figure 12 is a flow diagram illustrating a method 1200 of dynamically modifying characteristics of memory segments of a running application, which combines aspects of methods 900, 1000, and 1 100, according to one example.
- the method 1200 starts at 1202.
- At 1204 preconditions for no-copy
- a "no-copy” modification is a modification that does not involve the data in a segment being copied to a different backing memory region (e.g., splitting a 2MiB page into 512 4KiB pages). If the preconditions checked at 1204 are met, the method 1200 moves to 1208 where metadata with new parameters are created at 1208. At 1210, the segment is atomically updated to use the new metadata, and the method 1200 moves to 1230, which indicates the end of the method 1200. If the preconditions checked at 1204 are not met, the method 1200 moves to 1206, where the density of the segment is checked (e.g., the segment is checked to determine if it is dense or sparse).
- the method 1200 moves to 1212 where the segment is made to be read-only.
- a backing region with new parameters is created.
- data from the old backing region is copied to the new backing region.
- the segment is atomically updated to point to the new backing region.
- the old backing region is freed, and the method 1200 moves to 1230, which indicates the end of the method 1200.
- the method 1200 moves to 1222 where a new backing region with the desired properties is created.
- copy-on-reference mappings between the old backing region and the new backing region are created.
- the segment is atomically updated to use the copy-on-reference mappings created at 1224.
- One example of the present disclosure is directed to a method of modifying characteristics of an existing memory segment in a virtual address space for a running software application.
- the existing memory segment includes an identification of a first backing memory region in physical memory for storing contents of the existing memory segment.
- the method includes tracking memory access statistics of the running software application, identifying new characteristics for the existing memory segment based on the tracked memory access statistics, and generating an updated memory segment that includes the identified new characteristics.
- the system includes an application monitoring module to track memory access statistics of a running software application, wherein the running software application comprises a virtual address space with a first memory segment.
- the system also includes a memory segment characteristics identification module to identify new characteristics for the first memory segment based on the tracked memory access statistics, and a memory segment characteristics modification module to generate an updated memory segment that includes the identified new characteristics.
- Yet another example of the present disclosure is directed to a non- transitory computer-readable storage medium storing computer-executable instructions that when executed by at least one processor cause the at least one processor to perform a method.
- the method includes tracking memory access statistics of the running software application, wherein the running software application comprises a virtual address space with a first memory segment, and wherein the first memory segment includes an initial set of characteristics including an initial page size and an initial identification of a backing memory region.
- the method includes modifying at least one of the initial page size and the initial identification of a backing memory region of the first memory segment based on the tracked memory access statistics.
- Examples described herein provide the following: (1 ) improved flexibility in choosing address space characteristics to best match application behavior; (2) the ability to choose new address space characteristics during application runtime based on previous memory access patterns; and (3) improved support for choosing emerging memory characteristics.
- Features of some examples described herein include the following: (1 ) the ability to statically and
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Computer Hardware Design (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
A method of modifying characteristics of an existing memory segment in a virtual address space for a running software application. The existing memory segment includes an identification of a first backing memory region in physical memory for storing contents of the existing memory segment. The method includes tracking memory access statistics of the running software application, identifying new characteristics for the existing memory segment based on the tracked memory access statistics, and generating an updated memory segment that includes the identified new characteristics.
Description
MODIFYING CHARACTERISTICS OF A MEMORY SEGMENT
Background
[0001] With the introduction of systems with large amounts of physical memory with different characteristics, allocation of memory to applications and the operating system can become complex. Application programs are becoming complex, with large address spaces and with varying access patterns across the process address spaces.
Brief Description of the Drawings
[0002] Figure 1 is a diagram illustrating a computing environment suitable for implementing aspects of a memory segment configuration system according to one example.
[0003] Figure 2 is a diagram illustrating an address space and segment list of an application according to one example.
[0004] Figure 3 is a block diagram illustrating modules of a memory segment configuration system according to one example.
[0005] Figure 4 is a flow diagram illustrating a method of configuring memory segments of a running application according to one example.
[0006] Figure 5 is a flow diagram illustrating a method of configuring memory segments of a running application according to another example.
[0007] Figure 6 is a flow diagram illustrating a method of configuring memory segments of a running application using a database of application types according to one example.
[0008] Figure 7 is a flow diagram of a method for gathering memory access statistics using a PEBS (precise-event-based sampling) infrastructure according to one example.
[0009] Figure 8 is a flow diagram of a method for gathering memory access statistics by monitoring page faults according to one example.
[0010] Figure 9 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to one example.
[0011] Figure 10 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to another example.
[0012] Figure 1 1 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application according to yet another example.
[0013] Figure 12 is a flow diagram illustrating a method of dynamically modifying characteristics of memory segments of a running application, which combines aspects of the methods shown in Figures 9-1 1 , according to one example.
Detailed Description
[0014] In the following detailed description, reference is made to the
accompanying drawings which form a part hereof, and in which is shown by way of illustration specific examples in which the disclosure may be practiced. It is to be understood that other examples may be utilized and structural or logical changes may be made without departing from the scope of the present disclosure. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims. It is to be understood that features of the various examples
described herein may be combined, in part or whole, with each other, unless specifically noted otherwise.
[0015] One example is directed to the dynamic adaptation of an operating system address space, and more particularly to dynamically changing an operating system address space with memory segments with different characteristics.
[0016] With the introduction of systems with large amounts of physical memory with different characteristics, allocation of memory to applications and the operating system can become complex. Computer processors and memories are becoming increasingly more complex and heterogeneous, enabling segments of memory with different characteristics (e.g., page size, persistence, access times (access latency), bandwidth, etc.). Application programs are becoming complex, with large address spaces and with varying access patterns across the process address spaces. This results in suboptimal performance of applications because it is difficult to tune parts of the address spaces.
[0017] One specific example is directed to a mechanism to dynamically, at runtime, change individual memory segment configurations by determining an improved configuration of the segments from tracked past behavior, and by changing the configurations through copying segments to newly configured segments either dynamically or on demand. Adapting characteristics of segments of an application's address space improves application performance by having individual segments configured to have improved characteristics.
[0018] Figure 1 is a diagram illustrating a computing environment 10 suitable for implementing aspects of a memory segment configuration system according to one example. In the illustrated example, the computing system or computing device 10 includes one or more processing units 12 and system memory 14. Depending on the exact configuration and type of computing device, memory 14 may be volatile (such as RAM), non-volatile (such as ROM, flash memory, Memristive, phase change, and spin transfer torque memory, etc.), or some combination of the two.
[0019] Computing device 10 may also have additional or different
features/functionality and additional or different hardware and software. For
example, computing device 10 may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tape. Such additional storage is illustrated in Figure 1 by removable storage 16 and non-removable storage 18. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any suitable method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Memory 14, removable storage 16 and non-removable storage 18 are all examples of computer storage media (e.g., non-transitory computer-readable storage media storing computer-executable instructions that when executed by at least one processor cause the at least one processor to perform a method). Computer storage media includes RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Any such computer storage media may be part of computing device 10.
[0020] The various elements of computing device 10 are communicatively coupled together via one or more communication links 15. Computing device 10 also includes one or more communication connections 24, such as network connections, that allow computing device 10 to communicate with other computers/applications 26. Computing device 10 may also include input device(s) 22, such as keyboard, pointing device (e.g., mouse), pen, voice input device, touch input device, etc. Computing device 10 may also include output device(s) 20, such as a display, speakers, printer, etc.
[0021] Figure 1 and the above discussion are intended to provide a brief general description of a suitable computing environment in which one or more examples may be implemented. It should be understood, however, that handheld, portable, and other computing devices of all kinds are contemplated for use. Figure 1 thus illustrates an example of a suitable computing system
environment 10 in which the examples described herein may be implemented, although as made clear above, the computing system environment 10 is one example of a suitable computing environment and is not intended to suggest
any limitation as to the scope of use or functionality of the examples. Neither should the computing environment 10 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the example operating environment 10.
[0022] As shown in Figure 1 , a memory segment configuration system 300 is stored in system memory 14. One example of system 300 creates different memory segments of an application's address space with different
characteristics, and changes the characteristics of the memory segments based on memory access patterns observed after their creation. In this disclosure, address space regions of an application are referred to as memory segments in the virtual address space. Each memory segment according to one example has the following properties: (1 ) an address range that the memory segment covers; (2) a segment page size; and (3) identification of a backing memory region. The segment page size is defined by the hardware the system is running on. The backing memory region is a range of physical memory that is used to back the segment's contents. The backing memory region can have different characteristics based on the type of memory it is in. Memory segment configuration system 300 is described in further detail below with reference to Figures 2-4.
[0023] Figure 2 is a diagram illustrating an address space (AS) 202 and segment list 206 of a software application ("Application A") according to one example. As shown in Figure 2, the address space 202 for Application A includes memory segments 204(1 )-204(5) (collectively referred to as memory segments 204), and the segment list 206 includes memory segment characteristics 208(1 )-208(5) (collectively referred to as memory segment characteristics 208). In the illustrated example, the memory segment characteristics for each memory segment 204 include a base address, a segment size, a page size, and an identification of a backing memory region. Memory segment 204(1 ) ("segment #2") is a stack for Application A and includes memory segment characteristics 208(3). Memory segment 204(2) ("segment #4") is one of the larger segments and includes memory segment characteristics 208(5). Memory segment 204(3) ("segment #3") is one of the
larger segments and includes memory segment characteristics 208(4). Memory segment 204(4) ("segment #1 ") is a data section for Application A and includes memory segment characteristics 208(2). Memory segment 204(5) ("segment #0") is a text section for Application A and includes memory segment characteristics 208(1 ). Memory segments 204(1 ), 204(3), 204(4), and 204(5) are backed by system RAM 210 as represented by segments 214(1 ), 214(3), 214(4), and 214(5), respectively, and memory segment 204(2) is backed by system non-volatile memory (NVM) 212, as represented by segment 214(2), and uses larger pages. One example of the memory segment configuration system 300 shown in Figure 2 creates different memory segments, such as memory segments 204, of an application's address space, such as address space 202, with different characteristics, such as the characteristics 208, and changes the characteristics of the memory segments based on memory access patterns observed after their creation.
[0024] Figure 3 is a block diagram illustrating modules of a memory segment configuration system 300 according to one example. System 300 includes an application monitoring module 302, an application identification module 304, a memory segment identification module 306, a memory segment characteristics identification module 308, and a memory segment characteristics modification module 310. In one example, system 300 is implemented in an operating system, and performs dynamic changes in the characteristics of address space segments based on the past knowledge of the use of the segments, such as the sparsity and contiguity of segments, as well as spatial and temporal access patterns. In one implementation, the functionality of system 300 is exposed to the applications themselves, which allows each application to autonomously modify its address space to account for previously observed access patterns. In another implementation, system 300 is implemented in an OS level service that observes the applications' behavior and then adjusts their address space characteristics based on the observed access patterns. It is noted that the functionality of the modules in system 300 can be combined into a single module, or can be combined or broken apart in any other desired manner. Each
module in system 300 according to one example is a combination of hardware and software executing on that hardware to provide a given functionality.
[0025] Figure 4 is a flow diagram illustrating a method 400 of configuring memory segments of a running application according to one example. In one example, system 300 (Figure 3) performs method 400. At 402 in method 400, application monitoring module 302 monitors running applications and gathers memory statistics. At 404, application identification module 304 identifies one or more of the running applications for adjustment of memory segment
characteristics. In one example, to identify which applications out of multiple running applications to consider for address space characteristics adjustment, a fitness number is calculated for each of the running applications. One example fitness number for an application, p, can be obtained using the following
Equation I:
[0026] Equation I
[0028] Where:
[0029] mtib{p) = Number of TLB misses;
[0030] aa//(p) = Number of memory references;
[0031] lnvm(p) = Number of NVM reads;
[0032] anvm(p) = Number of NVM references;
[0033] smem(p) = Number of stall cycles on memory references;
[0034] San(p) = Number of stall cycles; and
[0035] Co, c-i , c2 = scaling coefficients.
[0036] As shown in Equation I, the fitness equation includes three terms. The first term (multiplied by coefficient Co) is the TLB (translation lookaside buffer) miss ratio of application, p, and represents the fitness of the current selection of page sizes, as bad page size selections will lead to higher miss ratios. The second term (multiplied by coefficient c-i ) is the NVM read ratio, and represents the fitness of NVM usage. The NVM read ratio will be high if there are mostly NVM reads, which is an indication to consider caching any read-heavy NVM- backed buffers in DRAM. The third term (multiplied by coefficient c2) is the ratio of CPU stalls caused by memory references, and represents the fitness of the
current memory locality of the memory segments of application, p. A high stall ratio indicates that one or more segments of application, p, are not local to the computation on those segments.
[0037] The application(s) with the lowest fitness number(s) is/are then selected at 404 in method 400 by application identification module 304 for further consideration. At 406 in method 400, for each application selected at 404, memory segment identification module 306 performs a detailed observation of the memory references for each memory segment of the selected application, and identifies memory segments of the application to be adjusted. In one example, module 306 uses Equation I on the observed per-segment data to generate per-segment fitness numbers, and identifies memory segments at 406 based on the per-segment fitness numbers (e.g., memory segments that have bad fitness numbers). At 408 in method 400, memory segment characteristics identification module 308 identifies improved segment characteristics for the segments identified at 406. In another example, subsequent iterations are performed over the candidate sections only rather than over all applications, and then a periodic switch is performed between the two approaches.
[0038] At 410 in method 400, memory segment characteristics modification module 310 adjusts segment characteristics of memory segments identified at 406 using the improved segment characteristics identified at 408. Example memory segment characteristics that may be adjusted at 410 include page size, Non-Uniform Memory Access (NUMA) region, memory type (e.g. RAM vs.
NVM), and NVM locality.
[0039] Examples of dynamic changes in the characteristics of address space segments that are made at 410 in method 400 based on observed access patterns include, but are not limited to, the following: (1 ) For sparsely populated segments (i.e., most of the segment is not used), one example adjusts the characteristics of the segment to use smaller pages, which allows the segment to be populated in a more fine-grained fashion and improves the performance of the actual populating; (2) For large segments whose access pattern
predominantly includes repeated accesses to decently-sized buffers (e.g., accessing elements of a matrix repeatedly), one example adjusts the
characteristics of the segment to use larger pages to improve performance (e.g., increases in speed of 1 .4 - 4x for matrix multiplication have been measured); (3) For applications that read from segments that are backed by non-volatile memory repeatedly, one example adjusts the characteristics of the segments to be backed by RAM rather than non-volatile memory to increase performance; and (4) For multi-threaded applications that execute across multiple NUMA domains, one example adjusts the characteristics of the segments such that the data for each thread is located in the local NUMA domain.
[0040] In one example, the selection of improved memory segment
characteristics for arbitrary applications is enabled by benchmarking a set of applications using different sets of memory segment characteristics to discover and create a database including a set of application types. The database can be made available to any application in the system using various techniques (e.g., providing the database as a system service or a shared library).
[0041] Figure 5 is a flow diagram illustrating a method 500 of configuring memory segments of a running application according to another example.
Methods 400 and 500 can be used to adjust address space characteristics online (i.e. while the application is running). At 502, memory access statistics for a running application are gathered for a user-defined amount of time. At 504, an application type for the running application is identified based on the statistics gathered at 502. At 506, improved memory segment characteristics for the identified application type are identified. At 508, the identified improved characteristics are applied to one or more memory segments of the running application. At 510, the method 500 waits for a user-defined timeout period, and then returns to 502.
[0042] Method 500 (due to the fact that it is executed periodically) can deal with applications whose type changes in phases without any modifications as well as adjusting the characteristics of individual memory segments without having to change the characteristics of the whole address space. Another example for applying the improved characteristics is to employ a system where applications provide metadata that includes their application type as described above, or a
list of memory segments and characteristics for selected segments which are applied when the application is launched.
[0043] Figure 6 is a flow diagram illustrating a method 600 of configuring memory segments of a running application using a database of application types according to one example. The method 600 starts at 602. At 604, the method 600 determines whether an auto mapping method for adjusting memory segment characteristics is enabled for the running application. If it is
determined at 604 that the auto mapping method is not enabled, the method 600 returns to 604 to repeat the determination. If it is determined at 604 that the auto mapping method is enabled, the method 600 moves to 606 to gather memory access statistics for the running application. At 608, a determination is made whether enough data has been gathered at 606. If it is determined at 608 that enough data has not been gathered, the method 600 returns to 606 to gather additional memory access statistics. If it is determined at 608 that enough data has been gathered, the method 600 moves to 610 to identify an application type for the running application based on the statistics gathered at 606.
[0044] At 614 in method 600, using database 612, memory segment
characteristics are selected based on the application type identified at 610. Database 612 according to one example is a database of application types with associated best characteristics for each application type. Database 612 according to one example includes data gathered from benchmarking a representative set of applications covering all application types which are extractable from memory access statistics.
[0045] At 616 in method 600, a conversion method is executed to convert one or more memory segments of the running application from their original
configuration with an original set of segment characteristics to a modified configuration with the new segment characteristics selected at 614. At 618, it is determined whether a recheck threshold has been reached. If it is determined at 618 that the recheck threshold has not been reached, the method 600 returns to 618 to repeat the determination. If it is determined at 618 that the recheck
threshold has been reached, the method 600 returns to 606 to repeat the process described above.
[0046] One aspect of some examples described herein involves observing the behavior of a running application to produce statistics regarding the
application's access patterns and use of different memory segments. One example implementation of this is to employ hardware performance counters to gather statistics of an application's access patterns to its address space. An example of hardware that supports this type of hardware performance counters is lntel®'s 4th generation Core™ processors, which have a facility called PEBS (precise-event-based sampling) Data Address profiling. The PEBS Data Address profiling enhances the performance counters that count memory accesses by providing a snapshot of the processor state at the point of the memory access. This snapshot includes the accessed address for each recorded memory access.
[0047] Figure 7 is a flow diagram of a method 700 for gathering memory access statistics using a PEBS infrastructure according to one example. In method 700, page size is the attribute that is being improved. At 702 in method 700, a buffer that can be used by the PEBS infrastructure to save the records containing the processor snapshot state is allocated. At 704, two of the programmable performance counters are configured to use PEBS with data address profiling. At 706, the PEBS infrastructure is configured to use the buffer allocated at 702. At 708, a first one of the performance counters is configured to count events of the type MEM_UOPS_RETIRED.ALL_LOADS, and a second one of the performance counters is configured to count events of the type MEM_UOPS_RETIRED.ALL_STORES. At 710, program execution is started (or resumed) for a short, fixed amount of time. At 712, upon expiration of the fixed amount of time, the performance counters are disabled. At 714, all data addresses from PEBS records are collected. At 716, all of the collected data addresses are sorted into buckets according to the 4KiB page the addresses are in. The example method 700 is specific to lntel®'s x86 architecture, and, as mentioned above, is based on a scenario where the page size of segments is being improved. Thus, at 716, all data accesses are sorted according to the
smallest possible pages in the system (x86 64bit architecture allows pages of 4KiB, 2MiB and 1 GiB).
[0048] As mentioned above, data accesses are sorted into buckets of the size of the smallest hardware page size in the system (e.g., 4KiB for x86). Technically this is possible because PEBS is reporting "linear addresses" rather than hardware pages for the sampled memory accesses. Thus, accesses on 2MiB pages are artificially divided into 4KiB buckets to see whether a benefit may be obtained from splitting 2MiB pages into 4KiB pages (e.g., if different hot spots are seen in a single 2MiB page).
[0049] At 718, the number of addresses in each bucket is counted, and a map of 4KiB pages to number of accesses of that page is created. Leveraging the information generated by method 700, access statistics for each memory segment of an application's address space can be generated by looking up all pages corresponding to a memory segment in the map created at 718.
[0050] For systems that do not have the facilities to measure performance in hardware, another example uses the methods used in NUMA computer systems to keep the data in memory that is local to the compute. These methods typically involve forcibly unmapping all of an application's pages, and then keeping track of the page faults for each page. Figure 8 is a flow diagram of a method 800 for gathering memory access statistics by monitoring page faults according to one example. At 802, all page table entries are marked as invalid (valid = 0). At 804, the method 800 keeps track of each handled page fault. At 806, the fault handler sets valid = 1 for faulting pages. At 808, after a predetermined (e.g., user-defined) time period, the method 800 returns to 802. Method 800 allows the creation of statistics on segment access patterns without the need for specialized hardware at the cost of some performance. The performance cost stems from the fact that page faults are being artificially introduced into the system to count accesses to different regions of the address space.
[0051] One aspect of some examples described herein involves dynamically converting memory segments of address spaces from one page type to another
page type. A page type as used herein refers to all characteristics of the segment such as page size, persistence, NUMA region and others.
[0052] Figure 9 is a flow diagram illustrating a method 900 of dynamically modifying characteristics of memory segments of a running application according to one example. At 902 in method 900, a segment to be converted is made to be read-only. At 904, the data stored in the segment's initial backing memory region is copied to a new backing memory region with the desired characteristics. At 906, the segment is updated to point to the new backing memory region created at 904. At 908, the method 900 frees up the initial backing memory region.
[0053] During 904 and 906 of method 900, write accesses to the segment may fail and the application may be stalled until the conversion is completed.
Method 900 can be modified by recognizing conversions that do not involve the data being copied to a different backing region (e.g., changing the page size of a segment while keeping the other characteristics), and applying a conversion procedure for such segments. The conversion procedure (shown in Figure 10) may have further preconditions that are dictated by the underlying hardware (e.g., how the address space segment and the backing memory region are aligned for commonly available paging memory management units) and may fall back on method 900 if those preconditions are not met.
[0054] Figure 10 is a flow diagram illustrating a method 1000 of dynamically modifying characteristics of memory segments of a running application according to another example. At 1002, preconditions are checked to determine if the method 1000 can be applied. If the preconditions are not satisfied, method 900 (Figure 9) is used. At 1004, the method 1000 creates new segment metadata parallel to application execution. At 1006, the application's segment metadata for the segment under conversion is atomically switched to the segment created at 1004. An advantage of method 1000 is that it should not stall the application even if it writes to the segment during the conversion because the data is not copied.
[0055] Another example of dynamically modifying characteristics of memory segments of a running application employs copy-on-reference mechanisms
when changing segment characteristics of sparse segments (Figure 1 1 ). Figure 1 1 is a flow diagram illustrating a method 1 100 of dynamically modifying characteristics of memory segments of a running application according to yet another example. At 1 102, segment density of a segment to be modified is checked to determine if the segment density is above a given threshold. If the segment density is above the threshold, method 900 (Figure 9) is used. If the segment density is not above the threshold, the method 1 100 continues. At 1 104, a new backing region for the segment is created with the desired characteristics. At 1 106, copy-on-reference mappings from old to new backing regions are created using a copy-on-reference method. At 1 108, the method 1 100 atomically updates the segment to use the new mappings. At 1 1 10, after all data has been copied from the old backing region to the new backing region, the old backing region is freed. Method 1 100 could also employ prefetching techniques to copy the data in the segment in parallel to application execution.
[0056] Figure 12 is a flow diagram illustrating a method 1200 of dynamically modifying characteristics of memory segments of a running application, which combines aspects of methods 900, 1000, and 1 100, according to one example. The method 1200 starts at 1202. At 1204, preconditions for no-copy
modification are checked. A "no-copy" modification is a modification that does not involve the data in a segment being copied to a different backing memory region (e.g., splitting a 2MiB page into 512 4KiB pages). If the preconditions checked at 1204 are met, the method 1200 moves to 1208 where metadata with new parameters are created at 1208. At 1210, the segment is atomically updated to use the new metadata, and the method 1200 moves to 1230, which indicates the end of the method 1200. If the preconditions checked at 1204 are not met, the method 1200 moves to 1206, where the density of the segment is checked (e.g., the segment is checked to determine if it is dense or sparse).
[0057] If it is determined at 1206 that the segment is dense, the method 1200 moves to 1212 where the segment is made to be read-only. At 1214, a backing region with new parameters is created. At 1216, data from the old backing region is copied to the new backing region. At 1218, the segment is atomically updated to point to the new backing region. At 1220, the old backing region is
freed, and the method 1200 moves to 1230, which indicates the end of the method 1200.
[0058] If it is determined at 1206 that the segment is sparse, the method 1200 moves to 1222 where a new backing region with the desired properties is created. At 1224, copy-on-reference mappings between the old backing region and the new backing region are created. At 1226, the segment is atomically updated to use the copy-on-reference mappings created at 1224. At 1228, it is determined whether all of the data has been copied from the old backing region to the new backing region. If it is determined at 1228 that all of the data has not been copied, the method 1200 repeats the check at 1228. If it is determined at 1228 that all of the data has been copied, the method 1200 moves to 1220 to free the old backing region, and the method 1200 ends at 1230.
[0059] One example of the present disclosure is directed to a method of modifying characteristics of an existing memory segment in a virtual address space for a running software application. The existing memory segment includes an identification of a first backing memory region in physical memory for storing contents of the existing memory segment. The method includes tracking memory access statistics of the running software application, identifying new characteristics for the existing memory segment based on the tracked memory access statistics, and generating an updated memory segment that includes the identified new characteristics.
[0060] Another example of the present disclosure is directed to a memory segment configuration system. The system includes an application monitoring module to track memory access statistics of a running software application, wherein the running software application comprises a virtual address space with a first memory segment. The system also includes a memory segment characteristics identification module to identify new characteristics for the first memory segment based on the tracked memory access statistics, and a memory segment characteristics modification module to generate an updated memory segment that includes the identified new characteristics.
[0061] Yet another example of the present disclosure is directed to a non- transitory computer-readable storage medium storing computer-executable
instructions that when executed by at least one processor cause the at least one processor to perform a method. The method includes tracking memory access statistics of the running software application, wherein the running software application comprises a virtual address space with a first memory segment, and wherein the first memory segment includes an initial set of characteristics including an initial page size and an initial identification of a backing memory region. The method includes modifying at least one of the initial page size and the initial identification of a backing memory region of the first memory segment based on the tracked memory access statistics.
[0062] Examples described herein provide the following: (1 ) improved flexibility in choosing address space characteristics to best match application behavior; (2) the ability to choose new address space characteristics during application runtime based on previous memory access patterns; and (3) improved support for choosing emerging memory characteristics. Features of some examples described herein include the following: (1 ) the ability to statically and
dynamically decide on the characteristics of each segment based on the past knowledge of the use of the segment, such as sparsity/contiguity of segments, and spatial and temporal access patterns; (2) mechanisms to effect changes in segment configuration while an application is running; (3) the ability to change segment characteristics at runtime without application restart; and (4) performance counter hardware to observe application behavior during normal execution to improve performance of on-line statistics on memory accesses.
[0063] Although specific examples have been illustrated and described herein, a variety of alternate and/or equivalent implementations may be substituted for the specific examples shown and described without departing from the scope of the present disclosure. This application is intended to cover any adaptations or variations of the specific examples discussed herein. Therefore, it is intended that this disclosure be limited only by the claims and the equivalents thereof.
Claims
1 . A method of modifying characteristics of an existing memory segment in a virtual address space for a running software application, wherein the existing memory segment includes an identification of a first backing memory region in physical memory for storing contents of the existing memory segment, the method comprising:
tracking memory access statistics of the running software application; identifying new characteristics for the existing memory segment based on the tracked memory access statistics; and
generating an updated memory segment that includes the identified new characteristics.
2. The method of claim 1 , wherein generating an updated memory segment comprises:
configuring a new memory segment to have the identified new
characteristics; and
copying contents of the existing memory segment to the new memory segment.
3. The method of claim 1 , wherein generating an updated memory segment comprises:
copying segment contents from the first backing memory region to a second backing memory region that includes the identified new characteristics; and
updating the existing memory segment to include an identification of the second backing memory region.
4. The method of claim 1 , wherein the identified new characteristics include at least one of page size, persistence, Non-Uniform Memory Access (NUMA) region, memory type, and non-volatile memory (NVM) locality.
5. The method of claim 1 , wherein the memory access statistics include at least one of sparsity, contiguity, spatial access patterns, and temporal access patterns.
6. The method of claim 1 , and further comprising:
tracking memory access statistics of a plurality of running software applications;
calculating a fitness number for each of the running software applications based on the tracked memory access statistics; and
identifying at least one of the running software applications for memory segment adjustment based on the calculated fitness numbers.
7. The method of claim 6, wherein each of the fitness numbers is a weighted metric of user-specified weights multiplied by results from the tracked memory statistics.
8. The method of claim 7, wherein each of the fitness numbers includes a first term comprising a translation lookaside buffer (TLB) miss ratio, a second term comprising a non-volatile memory read ratio, and a third term comprising a ratio of CPU stalls caused by memory references.
9. The method of claim 6, and further comprising:
calculating per-segment fitness numbers for a plurality of memory segments in the identified at least one of the running software applications; and identifying at least one of the plurality of memory segments for adjustment based on the per-segment fitness numbers.
10. The method of claim 1 , and further comprising:
providing a database of application types and a respective set of memory segment characteristics for each of the application types;
identifying an application type for the running software application based on the tracked memory access statistics; and
identifying the new characteristics from the database based on the identified application type.
1 1 . A memory segment configuration system, comprising:
an application monitoring module to track memory access statistics of a running software application, wherein the running software application comprises a virtual address space with a first memory segment;
a memory segment characteristics identification module to identify new characteristics for the first memory segment based on the tracked memory access statistics; and
a memory segment characteristics modification module to generate an updated memory segment that includes the identified new characteristics.
12. The system of claim 1 1 , and further comprising:
an application identification module to calculate a fitness number for each of a plurality of running software applications based on tracked memory access statistics for each of the running software applications, and identify at least one of the running software applications for memory segment adjustment based on the calculated fitness numbers.
13. The system of claim 12, wherein each of the fitness numbers is a weighted metric of user-specified weights multiplied by results from the tracked memory statistics.
14. A non-transitory computer-readable storage medium storing computer- executable instructions that when executed by at least one processor cause the at least one processor to perform a method, comprising:
tracking memory access statistics of the running software application, wherein the running software application comprises a virtual address space with a first memory segment, and wherein the first memory segment includes an
initial set of characteristics including an initial page size and an initial identification of a backing memory region; and
modifying at least one of the initial page size and the initial identification of a backing memory region of the first memory segment based on the tracked memory access statistics.
15. The computer-readable storage medium of claim 14, wherein the memory access statistics include at least one of sparsity, contiguity, spatial access patterns, and temporal access patterns.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013748 WO2016122585A1 (en) | 2015-01-30 | 2015-01-30 | Modifying characteristics of a memory segment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013748 WO2016122585A1 (en) | 2015-01-30 | 2015-01-30 | Modifying characteristics of a memory segment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016122585A1 true WO2016122585A1 (en) | 2016-08-04 |
Family
ID=56544006
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2015/013748 Ceased WO2016122585A1 (en) | 2015-01-30 | 2015-01-30 | Modifying characteristics of a memory segment |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2016122585A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6442666B1 (en) * | 1999-01-28 | 2002-08-27 | Infineon Technologies Ag | Techniques for improving memory access in a virtual memory system |
| US20030126354A1 (en) * | 2002-01-03 | 2003-07-03 | Kahn Opher D. | Method for dynamically adjusting a memory page closing policy |
| WO2012074850A2 (en) * | 2010-12-02 | 2012-06-07 | Microsoft Corporation | Efficient cache management |
| US20120159103A1 (en) * | 2010-12-21 | 2012-06-21 | Microsoft Corporation | System and method for providing stealth memory |
| US20140223442A1 (en) * | 2010-03-30 | 2014-08-07 | Red Hat Israel, Ltd. | Tracking Memory Accesses to Optimize Processor Task Placement |
-
2015
- 2015-01-30 WO PCT/US2015/013748 patent/WO2016122585A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6442666B1 (en) * | 1999-01-28 | 2002-08-27 | Infineon Technologies Ag | Techniques for improving memory access in a virtual memory system |
| US20030126354A1 (en) * | 2002-01-03 | 2003-07-03 | Kahn Opher D. | Method for dynamically adjusting a memory page closing policy |
| US20140223442A1 (en) * | 2010-03-30 | 2014-08-07 | Red Hat Israel, Ltd. | Tracking Memory Accesses to Optimize Processor Task Placement |
| WO2012074850A2 (en) * | 2010-12-02 | 2012-06-07 | Microsoft Corporation | Efficient cache management |
| US20120159103A1 (en) * | 2010-12-21 | 2012-06-21 | Microsoft Corporation | System and method for providing stealth memory |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Xiang et al. | Nomad:{Non-Exclusive} memory tiering via transactional page migration | |
| Dulloor et al. | Data tiering in heterogeneous memory systems | |
| Dashti et al. | Traffic management: a holistic approach to memory placement on NUMA systems | |
| Marathe et al. | Hardware profile-guided automatic page placement for ccNUMA systems | |
| Winter et al. | Adaptive sparse matrix-matrix multiplication on the GPU | |
| Laga et al. | Lynx: A learning linux prefetching mechanism for ssd performance model | |
| Li et al. | Identifying opportunities for byte-addressable non-volatile memory in extreme-scale scientific applications | |
| Saemundsson et al. | Dynamic performance profiling of cloud caches | |
| Gao et al. | Real-time in-memory checkpointing for future hybrid memory systems | |
| Zhang et al. | RnR: A software-assisted record-and-replay hardware prefetcher | |
| US20210157647A1 (en) | Numa system and method of migrating pages in the system | |
| Su et al. | Critical path-based thread placement for numa systems | |
| Marathe et al. | Feedback-directed page placement for ccNUMA via hardware-generated memory traces | |
| Huang et al. | Quail: Using nvm write monitor to enable transparent wear-leveling | |
| Tikir et al. | Hardware monitors for dynamic page migration | |
| Sun et al. | M5: Mastering page migration and memory management for cxl-based tiered memory systems | |
| Wang et al. | Efficient management for hybrid memory in managed language runtime | |
| Nihaal et al. | Selective memory compression for GPU memory oversubscription management | |
| Tikir et al. | NUMA-aware Java heaps for server applications | |
| Yan et al. | Using memory in the right way to accelerate Big Data processing | |
| Xiao et al. | FLORIA: A fast and featherlight approach for predicting cache performance | |
| Perarnau et al. | Controlling cache utilization of hpc applications | |
| Kim et al. | Code-based cache partitioning for improving hardware cache performance | |
| Chakraborty et al. | Integrating software caches with scratch pad memory | |
| WO2016122585A1 (en) | Modifying characteristics of a memory segment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15880478 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15880478 Country of ref document: EP Kind code of ref document: A1 |