Memory management method and apparatus, computer device and storage medium
By adding a memory management option to the BIOS Setup interface, the system can dynamically control the enabling or disabling of memory, solving the problem of time-consuming and laborious manual memory insertion and removal. This enables convenient and efficient memory management, improving server configuration efficiency and data integrity.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2026-04-02
AI Technical Summary
In existing technologies, managing server memory requires manually plugging and unplugging memory, which is time-consuming, labor-intensive, and inefficient. This is especially true in multi-processor server products where memory is fully configured, as repeatedly plugging and unplugging memory is particularly time-consuming and labor-intensive for customers and testers.
By adding options such as single memory module capacity, memory location, memory speed, and topology settings in the BIOS Setup interface, memory can be dynamically enabled or disabled. The topology settings can be enabled or disabled to control memory activation or deactivation. Combined with the BMC Web interface to display memory capacity, a convenient and fast memory management mechanism is provided.
It enables convenient memory management, saving time and effort, and improving the efficiency of server memory configuration. Especially in the RMT test of four-way and eight-way servers, it dynamically identifies and marks faulty memory, providing greater operational flexibility and improving the data integrity and efficiency of the server.
Smart Images

Figure CN2025107148_02042026_PF_FP_ABST
Abstract
Description
Memory management method and device, computer device and storage medium
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to the Chinese patent application No. 202411340328.8, filed on September 25, 2024, and entitled "Memory management method and device, computer device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of servers, and in particular to a memory management method and device, a computer device and a storage medium. BACKGROUND
[0004] Memory has a great impact on servers. The larger the memory capacity, the better the server performance. Therefore, in multi-path server products, up to 64 or 128 memories can be set in the server to expand the memory capacity of the server. Memory plays an invaluable role in server redundancy and fault recovery, and the position of memory is crucial in server stability.
[0005] If a memory in the server fails, other memories need to be used to replace the failed memory to ensure normal operation of the server. In addition, when testing the server, part of the memories need to be closed / opened. In order to meet the above requirements, the memories need to be reasonably configured and managed to improve the performance of the server. When performing RMT (Rank Margin Tool, memory stability test) test on the memory of the server, the stability of the memory and the performance of the server need to be tested under the condition that the memory is full. Similarly, the stability of the memory and the performance of the server need to be tested under the condition that the memory is opened by 1 / 2, 1 / 4, 1 / 8, etc. Currently, the number of memories opened in the server is adjusted by manually plugging in and out the memories. However, repeatedly plugging in and out the memories is time-consuming and laborious for customers and testers, and the efficiency is low.
[0006] Therefore, the related art has the problem that when managing the memories of the server, the memories need to be opened / closed by manually plugging in and out the memories, which is time-consuming and laborious and has low efficiency. SUMMARY
[0007] In a first aspect, the present application provides a memory management method, comprising:
[0008] obtaining attribute information of a memory component in a server;
[0009] generating a setting option of the memory component on a first setting interface according to the attribute information;
[0010] determining the memory to be closed in response to the memory stability test on the server; and
[0011] modifying the setting option of the memory to be closed to a first preset value to close the memory to be closed.
[0012] In some optional embodiments, after the memory to be closed is closed, the method further comprises:
[0013] obtaining a total capacity of the memory of the server;
[0014] determining whether the total capacity of the memory is a sum of memory capacities of the started memories, wherein the memories other than the memory to be closed in the memory component are the started memories;
[0015] obtaining an available memory capacity of the memory to be closed in the second setting interface;
[0016] determining whether the available memory capacity of the memory to be closed is zero; and
[0017] determining that the memory to be closed is successfully closed in response to the total capacity of the memory being the sum of the memory capacities of the started memories and the available memory capacity of the memory to be closed being zero.
[0018] In some optional embodiments, the setting option of the memory component is generated in the first setting interface according to the attribute information, comprising:
[0019] determining parameter information and topology information of the memory component according to the attribute information; and
[0020] generating a parameter setting option corresponding to the parameter information and a topology setting option corresponding to the topology information in the first setting interface, wherein the parameter setting option and the topology setting option are included in the setting option.
[0021] In some optional embodiments, modifying the setting option of the memory to be closed to the first preset value to close the memory to be closed, comprising:
[0022] modifying the topology setting option of the memory to be closed to the first preset value;
[0023] wherein the server is configured to subtract the memory capacity of the memory to be closed from the total capacity of the memory of the server and modify the available memory capacity of the memory to be closed in the second setting interface to zero when the topology setting option is the first preset value.
[0024] In some optional embodiments, after the setting option of the memory component is generated in the first setting interface according to the attribute information, the method further comprises:
[0025] entering the first setting interface after the server is started;
[0026] determining whether the topology setting option of the memory component exists in the first setting interface;
[0027] in response to the topology setting option of the memory component existing in the first setting interface, determining whether the topology setting option can be set to the second preset value and the first preset value; and
[0028] in response to the topology setting option being able to be set to the second preset value and the first preset value, determining that the setting option is generated successfully.
[0029] In some optional embodiments, the attribute information of the memory component in the server is obtained, including:
[0030] performing preset detection on the memory component to obtain a detection result; and
[0031] obtaining the attribute information of the memory component from the detection result.
[0032] In some optional embodiments, after the setting option of the memory component is generated in the first setting interface according to the attribute information, the method further includes:
[0033] in a power-on self-test stage of the server, determining whether a faulty memory is detected;
[0034] in response to the faulty memory being detected, modifying the topology setting option of the faulty memory in the first setting interface to a third preset value, and marking the topology setting option of the faulty memory with a preset label, wherein the preset label is used to determine that the memory component corresponding to the topology setting option is the faulty memory; and
[0035] modifying the available memory capacity of the faulty memory in the second setting interface to zero, and marking the available memory capacity of the faulty memory with the preset label.
[0036] In some optional embodiments, after the available memory capacity of the faulty memory in the second setting interface is modified to zero, and the available memory capacity of the faulty memory is marked with the preset label, the method further includes:
[0037] in response to a memory crash occurring in the process of performing the power-on self-test on the server, entering the second setting interface;
[0038] determining whether a memory component with zero available memory capacity and marked with the preset label exists in the second setting interface;
[0039] in response to the memory component with zero available memory capacity and marked with the preset label existing in the second setting interface, taking the memory component with zero available memory capacity and marked with the preset label as a to-be-handled memory; and
[0040] determining position information of the to-be-handled memory, and generating alarm information containing the position information.
[0041] In some optional embodiments, the method further comprises:
[0042] acquiring memory location silk screen information of the memory component; and
[0043] generating a string containing the memory location silk screen information, and storing the string in a silk screen table, wherein the silk screen table is used to locate the memory component.
[0044] In some optional embodiments, determining the location information of the memory to be processed comprises:
[0045] inquiring the memory location silk screen information of the memory to be processed in the silk screen table; and
[0046] taking the memory location silk screen information of the memory to be processed as the location information.
[0047] In some optional embodiments, after generating the alarm information containing the location information, the method further comprises:
[0048] restarting the server and re-determining the memory component to be detected corresponding to the location information in the alarm information;
[0049] re-detecting the memory component to be detected, and in response to the memory component to be detected having no fault, modifying a topology setting option of the memory component to be detected in the first setting interface to a second preset value and deleting a preset word; and
[0050] modifying available memory capacity of the memory component to be detected in the second setting interface to a fourth preset value and deleting a preset word.
[0051] In some optional embodiments, after closing the memory to be closed, the method further comprises:
[0052] acquiring available memory capacity of the memory component from the second setting interface;
[0053] taking the memory component with the available memory capacity other than zero as the memory component to be trained; and
[0054] during the memory training of the memory component, only training the memory component to be trained.
[0055] In some optional embodiments, the attribute information of the memory component comprises one or more of memory capacity, memory location, memory rate and topology relationship.
[0056] In some optional embodiments, the first setting interface is a BIOS Setup interface, and according to the attribute information, the setting option of the memory component is generated in the first setting interface, comprising:
[0057] setting a start flag bit and an end flag bit in the BIOS Setup interface; and
[0058] The attribute information is updated to the specified position of the Setup interface in the form of a BIOS option according to the start flag and the end flag.
[0059] In some optional embodiments, the memory stability test of the server includes testing the stability of the memory and the performance of the server when 1 / 2 of the memory is turned on, testing the stability of the memory and the performance of the server when 1 / 4 of the memory is turned on, and testing the stability of the memory and the performance of the server when 1 / 8 of the memory is turned on.
[0060] In response to the memory stability test of the server, determining the memory to be closed includes:
[0061] In response to the test of the stability of the memory and the performance of the server when 1 / 2 of the memory is turned on, determining that 1 / 2 of the memory components that need to be closed is the memory to be closed;
[0062] In response to the test of the stability of the memory and the performance of the server when 1 / 4 of the memory is turned on, determining that 3 / 4 of the memory components that need to be closed is the memory to be closed; and
[0063] In response to the test of the stability of the memory and the performance of the server when 1 / 8 of the memory is turned on, determining that 7 / 8 of the memory components that need to be closed is the memory to be closed.
[0064] The 1 / 2 of the memory components that need to be closed, the 3 / 4 of the memory components that need to be closed, and the 7 / 8 of the memory components that need to be closed are set by demand information or randomly selected.
[0065] In some optional embodiments, the method further includes:
[0066] In response to the total capacity of the memory being greater than the sum of the memory capacities of the started memory, determining that the memory to be closed is not completely closed; and
[0067] In response to the total capacity of the memory being less than the sum of the memory capacities of the started memory, determining that the server has a fault.
[0068] In some optional embodiments, the second setting interface is a BMC Web interface, and the available memory capacity of each memory component in the server is displayed in the second setting interface, and the method further includes:
[0069] In response to the available memory capacity of the memory to be closed being not zero, determining that the memory to be closed is not completely closed.
[0070] In a second aspect, the application provides a memory management device, including:
[0071] An acquisition module is configured to acquire attribute information of memory components in a server.
[0072] The generating module is configured to generate, according to the attribute information, a setting option of the memory component on the first setting interface.
[0073] The determining module is configured to determine the memory to be closed in response to the memory stability test on the server; and
[0074] The closing module is configured to modify the setting option of the memory to be closed to a first preset value, and close the memory to be closed.
[0075] In a third aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer readable instructions, and the processor executes the computer readable instructions to perform the memory management method of the first aspect or any of the corresponding embodiments thereof.
[0076] In a fourth aspect, the present application provides a non-volatile computer readable storage medium, which stores computer readable instructions, and the computer readable instructions are used to make a computer execute the memory management method of the first aspect or any of the corresponding embodiments thereof.
[0077] In a fifth aspect, the present application provides a computer program product, which comprises computer readable instructions, and the computer readable instructions are used to make a computer execute the memory management method of the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the specific embodiments or the related art, the drawings needed in the specific embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0079] FIG. 1 is a flowchart of a memory management method according to one or more embodiments of the present application;
[0080] FIG. 2 is a system architecture diagram of a server basic input / output system and a server operating system according to one or more embodiments of the present application;
[0081] FIG. 3 is a flowchart of a dynamic memory setting and a fault memory positioning implementation according to one or more embodiments of the present application;
[0082] FIG. 4 is a flowchart of an RMT test memory dynamic setting according to one or more embodiments of the present application;
[0083] FIG. 5 is a flowchart of a positioning memory down instance according to one or more embodiments of the present application;
[0084] Figure 6 is a structural block diagram of a memory management device according to one or more embodiments of the present application;
[0085] Figure 7 is a schematic diagram of the hardware structure of a computer device according to one or more embodiments of the present application. DETAILED DESCRIPTION
[0086] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0087] Memory plays an invaluable role in the redundancy and failure recovery of a server, and the position of memory is crucial in the stability of a server. When a certain memory fails, other storage modules need to take over the work of the failed memory, so reasonable configuration and management of memory can improve the performance of a server. How to conveniently manage memory and make it more convenient for customers to operate and control memory is the key to improving the performance of server memory, especially when performing RMT tests on four-way and eight-way servers. The original method is to rely on manual insertion and removal of memory to realize the opening or closing of memory. Since a server has 64, 128 or more memories when fully configured, manually inserting and removing memories is a huge task. After testing the memory stability of a fully configured server, half of the memories are removed, and then the memory stability of a semi-configured server is tested. Subsequently, 1 / 4 and 1 / 8 DIMM (Dual-Inline-Memory-Modules) memory configurations are tested. Since a server is generally packaged as a whole, especially for four-way or eight-way fully configured servers, repeatedly inserting and removing configured memories is particularly time-consuming and laborious for customers and test personnel. In addition, the data integrity and efficiency of a server are important indicators for evaluating the performance of a server. The BIOS (basic input output system) interface of a server on the market has not yet involved the function of flexibly setting the memory capacity and dynamically identifying and marking failed memory.
[0088] Based on the above, the embodiment of the present application provides a memory management method, in which options including single-root memory capacity, memory location, memory rate, topology setting and the like are added in a BIOS setup interface, and the memory is dynamically started or closed by setting the topology setting option as Enable and Disable. After the option is started, the memory at the corresponding position is enabled, and after the option is closed, the memory at the corresponding position is disabled, the capacity corresponding to the memory is set as 0, the total capacity of the server memory also needs to be changed to the total capacity minus the closed memory capacity, and the memory at the corresponding position in the BMC Web (Baseboard Management Controller World Wide Web, baseboard management controller system web) interface is also displayed as the memory capacity being 0, so as to determine that the memory at the position is not enabled. The switch is added in the BIOS, if the half or 1 / 4 memory is set, only the memory switch at the specific position needs to be set as Disable, and the operation mode saves time and effort for the customer. By adding the option of the single-root memory attribute switch, a great operation space is provided for the customer to reasonably configure the memory, so as to achieve the effect of providing a more convenient and fast memory management and positioning of the faulty memory mechanism.
[0089] According to the embodiment of the present application, a memory management embodiment is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer device with data processing capability, for example, a computer, a server and the like, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that herein.
[0090] In the embodiment, a memory management method is provided, which can be used in the computer device described above. FIG. 1 is a flowchart of the memory management method according to the embodiment of the present application. As shown in FIG. 1, the flow includes the following steps:
[0091] In step S101, attribute information of a memory component in a server is acquired.
[0092] Specifically, the attribute information is, for example, memory capacity, memory location, memory rate, topology relationship and the like. The server BIOS system acquires the memory attribute of the memory component, such as the rate and capacity of the memory, from the SPD (Serial Presence Detect) result of the memory component, wherein the SPD is a standardized way to access information about the memory component.
[0093] It should be noted that the BIOS system is responsible for initializing hardware and loading the operating system (Operating System, OS) during the server startup process. In this process, the BIOS system communicates with the SPD component through the SMBus (System Management Bus) interface, reads the information stored in the SPD component, including the capacity, speed, and type of memory. The SPD component is an EEPROM (Electrically Erasable Programmable Read-Only Memory) located on the memory component, used to store the configuration information of the memory component in the above SPD result, including but not limited to the memory capacity, memory location, memory speed, topology relationship, memory type (such as DDR3, DDR4, etc.), manufacturer, serial number, etc.
[0094] The server BIOS system is responsible for performing hardware self-checking, initialization, and loading the bootloader when the server starts. As shown in FIG. 2, the hardware architecture of the server BIOS system mainly involves the BIOS chip, CMOS (Complementary Metal Oxide Semiconductor) memory, system bus, and input / output (I / O) devices. The BIOS chip is used to store the program of the server BIOS system, and the BIOS chip is located on the motherboard, usually a read-only programmable memory (ROM) chip. The CMOS memory is used to save the configuration information of the system, such as date, time, hardware configuration, etc. The server BIOS system communicates with other components of the server through the system bus, such as data transmission and control between the CPU (Central Processing Unit), memory, disk / storage device, I / O device, SPD component, etc. The server BIOS system will ensure that these devices are in a usable state when starting, and load the necessary drivers or configuration information, such as the SMBus bus.
[0095] Step S102, according to the attribute information, generating a setting option of the memory component in the first setting interface.
[0096] Specifically, the first setting interface is, for example, the BIOS Setup interface. The server BIOS system sets the start flag bit and the end flag bit in the BIOS Setup interface, and updates the attribute information of the memory component in the form of a BIOS option to the specified position of the BIOS Setup interface. The specified position is set according to actual needs. The above process is shown in FIG. 3, the speed and capacity of the memory and other memory attributes are obtained from the SPD of the memory; by setting the start flag bit and the end flag bit, the attribute information of the memory is updated to the specified position of the Setup interface in the form of a BIOS option.
[0097] Step S103, in the case of needing to perform memory stability test on the server, determine the memory to be closed.
[0098] Specifically, in the case of needing to perform RMT test (memory stability test) on the server, the stability of the memory and the performance of the server in the case of full memory allocation need to be tested, and similarly, the stability of the memory and the performance of the server in the case of 1 / 2, 1 / 4, 1 / 8, etc. of the memory being opened need to be tested. The RMT test is usually performed by the server OS system (operating system) or a special RMT test tool. The server OS system or the RMT test tool can start the RMT test, check the reliability and stability of the memory and the performance of the server, and generate a test report after the test is completed, providing the health status information of the memory.
[0099] When testing the stability of the memory and the performance of the server in the case of full memory allocation, all memory components need to be opened, and there is no need to close the memory components. When testing the stability of the memory and the performance of the server in the case of 1 / 2 of the memory being opened, half of the memory components in the server need to be closed, and the half of the memory components to be closed is the memory to be closed. The memory to be closed can be set according to actual needs or can be randomly selected. In addition, when testing the stability of the memory and the performance of the server in the case of 1 / 4, 1 / 8, etc. of the memory being opened, 3 / 4, 7 / 8, etc. of the memory components need to be closed, and the memory to be closed can be set according to actual needs or can be randomly selected. Therefore, before performing the memory stability test on the server, the server OS system will determine the memory components to be closed, i.e. the memory to be closed.
[0100] Step S104, modify the setting option of the memory to be closed to a first preset value, and close the memory to be closed.
[0101] Specifically, the first preset value is, for example, Disable. After the server OS system determines the memory to be closed, it instructs the BIOS system to modify the option value of the setting option of the memory to be closed in the BIOS Setup interface to Disable, closes the memory to be closed, and restarts the server after saving the changes. The server OS system and the server BIOS system are two different system components at different levels, and cannot directly transmit data. Therefore, the server OS system can first control the server BMC to write the information of the memory to be closed into the SPD component, and the BIOS system will read the memory to be closed from the SPD component after starting, and then close it.
[0102] The server operating system (OS system) is the core software for managing computer hardware and software resources. The hardware architecture thereof is relatively complex, as shown in FIG. 2. The server OS system runs on a CPU, a memory, and a disk / storage device, and is used to manage all hardware resources. The CPU is the core component of the server, responsible for executing program instructions and processing data. The server OS system manages the resources of the computer through the CPU. The memory is a storage device in the server for temporarily storing data and programs. The server OS system needs the memory to load and execute programs. The disk / storage device is used to permanently store data and programs. The server OS system manages the data on these storage devices through a file system. The server OS system can also interact with I / O devices through corresponding drivers, responsible for managing the input and output operations of these devices, including keyboards, mice, displays, printers, etc. The server OS system can send a control instruction to the server BMC to control the server BMC to write information about the memory to be closed into the SPD component. After the BIOS system starts, it will read the memory to be closed from the SPD component and then close it.
[0103] The above process is shown in FIG. 4. The RMT test is performed, the semi-configured memory configuration is performed, the Setup interface is entered after booting, and the option value of the semi-configured memory to be closed is set to Disable. After the setting is completed, the server is restarted.
[0104] The memory management method provided in this embodiment generates a setting option of the memory component in the first setting interface according to the attribute information of the memory component in the server. Only the option value of the setting option needs to be modified to control the opening or closing of the memory component. This operation method saves time and effort for the customer. In the case of needing to test the memory stability of the server, the setting option of the memory to be closed is modified to the first preset value, the specified memory is closed, and a great operable space is provided for the customer and a more convenient and fast memory management mechanism is provided. The problem of time-consuming, labor-intensive, and low efficiency in opening / closing the memory by manually plugging in the memory when managing the server memory is solved.
[0105] In some optional embodiments, after the memory to be closed is closed, the method further includes:
[0106] obtaining the total capacity of the memory of the server;
[0107] regarding the memory other than the memory to be closed in the memory component as started memory, and determining whether the total capacity of the memory is the sum of the memory capacities of the started memory;
[0108] obtaining the available memory capacity of the memory to be closed in the second setting interface;
[0109] determining whether the available memory capacity of the memory to be closed is zero;
[0110] If the total memory capacity is the sum of the memory capacities of the started memories and the available memory capacity of the to-be-closed memory is zero, it is determined that the to-be-closed memory is successfully closed.
[0111] Specifically, the setting option of the to-be-closed memory is modified to the first preset value, the to-be-closed memory is closed, and the total memory capacity of the server is correspondingly changed to the total capacity minus the memory capacity of the closed memory.
[0112] The memory other than the to-be-closed memory in the memory component is regarded as the started memory. The server OS system obtains the total memory capacity of the current server, judges whether the total memory capacity is the sum of the memory capacities of the started memories, if the total memory capacity is greater than the sum of the memory capacities of the started memories, it indicates that the to-be-closed memory is not completely closed. If the total memory capacity is less than the sum of the memory capacities of the started memories, it indicates that the server is malfunctioning. If the total memory capacity is less than the sum of the memory capacities of the started memories, it indicates that the to-be-closed memory is completely closed.
[0113] The second setting interface, for example, a BMC Web interface, displays the available memory of each memory component in the server. If the memory component is closed, the available memory of the memory component in the second setting interface is zero. If the memory component is opened, the available memory of the memory component in the second setting interface can be set according to actual needs, which is 0 to 100% of the memory capacity of the memory component.
[0114] The server OS system accesses the second setting interface, obtains the corresponding available memory capacity of the to-be-closed memory in the second setting interface, and judges whether the available memory capacity of the to-be-closed memory is zero. If it is not zero, it indicates that the to-be-closed memory is not completely closed.
[0115] If the total memory capacity is the sum of the memory capacities of the started memories and the available memory capacity of the to-be-closed memory is zero, it is determined that the to-be-closed memory is successfully closed.
[0116] In the embodiment, whether the total memory capacity is the sum of the memory capacities of the started memories is judged, and whether the available memory capacity of the to-be-closed memory is zero is judged, to determine whether the to-be-closed memory is successfully closed. The method is simple, effective, and easy to implement. In addition, by setting the available memory capacity of the to-be-closed memory to zero, it is ensured that the to-be-closed memory does not affect the test of the server.
[0117] In some optional embodiments, according to the attribute information, the setting option of the memory component is generated in the first setting interface, including:
[0118] According to the attribute information, the parameter information and the topology information of the memory component are determined.
[0119] The parameter setting option corresponding to the parameter information and the topology setting option corresponding to the topology information are generated in the first setting interface, and the parameter setting option and the topology setting option are included in the setting option.
[0120] Specifically, the server BIOS system determines the parameter information and the topology information of the memory component according to the attribute information. The parameter information includes, for example, memory capacity, memory location, memory rate, and the like. The topology information includes whether the memory component is connected to the server and whether the memory component is in place. The server BIOS system sets a start flag bit and an end flag bit for each parameter information, respectively, and generates a parameter setting option corresponding to the parameter information in the first setting interface, such as a memory capacity option, a memory rate option, and the like. The parameter information of the memory component can be set through the parameter setting option.
[0121] The server BIOS system generates a topology setting option corresponding to the topology information in the first setting interface. The topology setting option can set two values, which are a first preset value and a second preset value. The first preset value is, for example, Disable, and the second preset value is, for example, Enable. When the topology setting option is the first preset value, the corresponding memory component is turned off. When the topology setting option is the second preset value, the corresponding memory component is turned on.
[0122] The above process is shown in FIG. 3. The memory topology information is displayed in the form of an option in the designated interface, and the option value can be modified to Disable or Enable.
[0123] In the embodiment, the parameter setting option corresponding to the parameter information and the topology setting option corresponding to the topology information are generated in the first setting interface. The user can modify the parameter information of the memory component through the parameter setting option and turn on or turn off the memory component through the topology setting option. This provides a great operational space for the customer and provides a more convenient and fast mechanism for managing the memory.
[0124] In some optional embodiments, the setting option of the memory to be turned off is modified to the first preset value, and the memory to be turned off is turned off, including:
[0125] The topology setting option of the memory to be turned off is modified to the first preset value.
[0126] The server is configured to, when the topology setting option is the first preset value, subtract the memory capacity of the memory to be turned off from the total memory capacity of the server, and modify the available memory capacity of the memory to be turned off in the second setting interface to zero.
[0127] Specifically, the first preset value is, for example, Disable. The server BIOS system modifies the topology setting option of the memory to be turned off to the first preset value, and turns off the memory to be turned off. The server BIOS system writes the above operation into a BIOS log.
[0128] The server OS system reads the BIOS log, determines that the topology setting option is modified to the first preset value, and disables the to-be-closed memory. The server OS system modifies the available memory capacity of the to-be-closed memory in the second setting interface to zero. In addition, the total memory capacity of the server also needs to be changed to the total capacity minus the memory capacity of the to-be-closed memory. The above process is shown in FIG. 3. The specified memory is closed, the setting option value is Disable, the changes are saved, and the server is restarted.
[0129] As shown in FIG. 2, the BIOS log is a collection of a series of events and error information recorded by the server BIOS system during the startup process, including: hardware device state change information, self-check (POST) information, event information during the startup process, system error information, and operation information of the server BIOS system. The server BIOS system can save the BIOS log in the non-volatile memory, the flash memory chip, and the specific storage area. The server OS system can use the tool provided by the operating system or the third-party software to obtain the BIOS log. For example, the event viewer (Event Viewer) is used to view and export the event log related to the BIOS. These logs usually contain important information recorded by the BIOS during the startup process, such as hardware failure, startup event, etc. The dmesg command is used to view the kernel log. These logs sometimes contain BIOS alarm information. By running the dmesg|grep-i"bios" command, the log entries related to the BIOS can be filtered out. The server OS system reads the BIOS log and determines whether the topology setting option is modified to the first preset value.
[0130] In the embodiment, by setting the available memory capacity of the to-be-closed memory to zero and subtracting the memory capacity of the to-be-closed memory from the total memory capacity of the server, it is ensured that the to-be-closed memory will not affect the test of the server.
[0131] In some optional embodiments, after generating the setting option of the memory component in the first setting interface according to the attribute information, the method further includes:
[0132] After the server is powered on, the first setting interface is entered;
[0133] It is judged whether the topology setting option of the memory component exists in the first setting interface;
[0134] If it exists, it is judged whether the topology setting option can be set to the second preset value and the first preset value;
[0135] If yes, it is determined that the setting option is generated successfully.
[0136] Specifically, the first setting interface is, for example, a BIOS Setup interface. After the server is powered on, the BIOS Setup interface is entered, and the server BIOS system determines whether the memory topology information is displayed in the form of an option at a designated position, that is, whether the topology setting option of the memory component exists in the first setting interface.
[0137] The first preset value is, for example, Disable, and the second preset value is, for example, Enable. If the topology setting option exists, the server BIOS system further determines whether the topology setting option can be set to the second preset value and the first preset value, and if yes, it is determined that the setting option is successfully generated. The topology setting option can be set to the first preset value to turn off the corresponding memory component, or the topology setting option can be set to the second preset value to turn on the corresponding memory component.
[0138] In some optional embodiments, the attribute information of the memory component in the server is acquired, including:
[0139] The memory component is pre-detected to obtain a detection result;
[0140] The attribute information of the memory component is acquired from the detection result.
[0141] Specifically, the pre-detection is, for example, SPD detection. The SPD is a standardized way of accessing information about the memory component, and the SPD detection of the memory component is a key step of the POST phase of the server BIOS system. The SPD detection of the memory component is performed to obtain the SPD detection result of the memory component, and the attribute information of the memory, such as the speed and capacity of the memory, is acquired from the SPD of the memory. The attribute information is, for example, the memory capacity, the memory location, the memory speed, the topology relationship, and the like.
[0142] The process in which the server BIOS system acquires the attribute information from the SPD of the memory component can include: the server BIOS system initializes the server hardware, such as the CPU, the memory controller, and the like; the SMBus is configured to ensure that the server BIOS system can correctly read the information in the SPD component; the SPD component on each memory component has a fixed address, the server BIOS system addresses the SPD chip through the SMBus and reads the SPD data, and the reading operation generally adopts the way of byte-by-byte reading or batch reading; the server BIOS system parses the read SPD data to extract the attribute information of the memory component.
[0143] In the embodiment, the attribute information of the memory component in the server is acquired, which facilitates the generation of the setting option of the memory component according to the attribute information.
[0144] In some optional embodiments, after generating the setting option of the memory component in the first setting interface according to the attribute information, the method further comprises:
[0145] In a power-on self-test stage of the server, it is judged whether a faulty memory is detected;
[0146] If the faulty memory is detected, the topology setting option of the faulty memory in the first setting interface is modified to a third preset value, and the topology setting option of the faulty memory is marked with a preset word, wherein the preset word is used to determine that the memory component corresponding to the topology setting option is the faulty memory.
[0147] The available memory capacity of the faulty memory in the second setting interface is modified to zero, and the available memory capacity of the faulty memory is marked with the preset word.
[0148] Specifically, in a power-on self-test (Post) stage of the server, the server BIOS system judges whether a faulty memory is detected, for example, a memory with dirty golden fingers, a memory with problems from the factory, etc.
[0149] The preset word is, for example, a fault word, and the third preset value is, for example, 0G or other values. If the faulty memory is detected, the server BIOS system modifies the topology setting option of the faulty memory in the first setting interface to the third preset value, and marks the topology setting option of the faulty memory with the preset word. In addition, the topology setting option of the faulty memory can also be adjusted to a grayed-out option, which cannot be modified. The server BIOS system records the above operation in a BIOS log.
[0150] The server cannot use the faulty memory, and therefore, after the server OS system determines the faulty memory, the server OS system disables the faulty memory in the server. The server OS system modifies the available memory capacity of the faulty memory in the second setting interface to zero, and marks the available memory capacity of the faulty memory with the preset word.
[0151] The above process is shown in FIG. 3, which judges whether a faulty memory is detected in the Post process; and automatically displays the faulty memory as a grayed-out option with 0G and a fault word under the corresponding page.
[0152] In the present embodiment, if the faulty memory is detected, the faulty memory is marked in the first setting interface and the second setting interface, respectively, thereby providing a function of dynamically identifying and marking the faulty memory, which is convenient for the user to determine the faulty memory and repair.
[0153] In some optional embodiments, in the case where the server has a memory outage, the process of detecting whether there is a faulty memory comprises steps A1 to A3.
[0154] Step A1, during the server restart process, obtaining a remote serial port log;
[0155] Specifically, the remote serial port log, i.e., the SOL log, is obtained through a SOL (Serial Over Lan) remote serial port. It should be noted that the SOL is a technology for accessing a remote computer serial port over a network. Through the SOL technology, a user can access serial port devices such as consoles, debuggers, and other serial port devices located on a remote computer through a network connection. The SOL remote serial port log in the present embodiment, also referred to as a serial port remote management log, is obtained through serial port remote management, which is a process of allowing a user to remotely access and manage the serial port of a device through a network connection to facilitate monitoring and configuration. During the serial port remote management process, the serial port remote manager converts the serial port information of the device into a network stream and transmits it to the computer of the user, which contains some important parameters, such as device status information, port parameters, control commands, and debugging information, etc. These information will be recorded in the remote serial port log during the serial port communication process.
[0156] Step A2, detecting the remote serial port log, and in a case where it is determined that there is at least one faulty memory address in the remote serial port log, determining that the server is down due to a faulty memory. And determining the faulty memory according to the faulty memory address.
[0157] Specifically, the remote serial port log can help users quickly locate and solve problems with the device. Users can view the remote serial port log to obtain information about the device status, error information, error codes, and other debugging information to further troubleshoot the cause of the problem. In addition, the remote serial port log can also be used to monitor the performance and status of the device to promptly discover and solve possible problems.
[0158] In the present embodiment, the remote serial port log is obtained, and it is determined that the server is down due to a server memory fault through the remote serial port log, and the faulty memory address is determined and the faulty memory is determined according to the faulty memory address.
[0159] In some optional embodiments, after modifying the available memory capacity of the faulty memory in the second setting interface to zero and marking the available memory capacity of the faulty memory with the preset word, the method further comprises:
[0160] If a memory crash occurs during the power-on self-test of the server, the second setting interface is entered;
[0161] Judging whether there is a memory component in the second setting interface whose available memory capacity is zero and which is marked with the preset word;
[0162] If the memory component with zero available memory capacity and marked with the preset word exists, the memory component is regarded as the to-be-handled memory.
[0163] The location information of the to-be-handled memory is determined, and alarm information containing the location information is generated.
[0164] Specifically, the second setting interface is, for example, a BMC Web interface. If a memory outage occurs during the power-on self-test (POST) process of the server BIOS system, the server BIOS system records the memory outage in a BIOS log. The server OS system reads the BIOS log, determines that a memory outage occurs during the power-on self-test process of the server BIOS system, enters the BMC Web interface, and can obtain the available memory capacity of each memory component of the server from the BMC Web interface.
[0165] The server OS system determines whether the memory component with zero available memory capacity and marked with the preset word exists in the BMC Web interface. If the memory component exists, according to the foregoing content, the memory component is a faulty memory, and thus the memory component with zero available memory capacity and marked with the preset word is regarded as the to-be-handled memory.
[0166] The server OS system determines the location information of the to-be-handled memory, generates alarm information containing the location information, and notifies a user or a server operation and maintenance personnel of the to-be-handled memory through the alarm information, for example, to clean the gold finger surface of the to-be-handled memory or replace the to-be-handled memory.
[0167] The foregoing process is shown in FIG. 5. During the server POST process, a memory outage occurs, the in-place condition of the memory is checked in the Bmc web interface, it is determined whether the memory component with zero available memory capacity and marked with the fault word exists in the Bmc web interface, if not, the server is powered on again, and if yes, the memory component is identified as a faulty memory, and the gold finger surface of the memory is cleaned or the memory is replaced.
[0168] In this embodiment, by determining whether the memory component with zero available memory capacity and marked with the preset word exists in the second setting interface, the to-be-handled memory that fails in the server is determined, alarm information containing the location information of the to-be-handled memory is generated, and the user or the server operation and maintenance personnel can quickly identify the faulty memory and repair the faulty memory.
[0169] In some optional embodiments, the method further includes:
[0170] Obtaining memory location silk screen information of the memory component;
[0171] Generating a character string containing the memory location silk screen information, and storing the character string in a silk screen table, wherein the silk screen table is used to locate the memory component.
[0172] Specifically, the server OS system acquires the memory location silkscreen information of each memory component specified by the project. The memory location silkscreen information is stored in the established silkscreen table in the form of a string. The memory location silkscreen information of the memory component can be subsequently queried in the silkscreen table to determine the physical location of the memory component in the server chassis.
[0173] In the embodiment, the string containing the memory location silkscreen information is stored in the silkscreen table, and the memory location silkscreen information of the memory component can be queried in the silkscreen table to determine the physical location of the memory component in the server chassis, so that the user can quickly locate the memory component in the server.
[0174] In some optional embodiments, the location information of the memory to be processed is determined, including:
[0175] The memory location silkscreen information of the memory to be processed is queried in the silkscreen table;
[0176] The memory location silkscreen information of the memory to be processed is used as the location information.
[0177] Specifically, the server OS system queries the memory location silkscreen information of the memory to be processed in the silkscreen table. For example, the silkscreen table records the correspondence between the number of the memory component and the memory location silkscreen information, such as the BDF (Bus / Device / Function) number. The memory location silkscreen information of the memory to be processed is queried in the silkscreen table according to the BDF number of the memory to be processed.
[0178] In some optional embodiments, in addition to determining the silkscreen information of the memory to be processed by using the silkscreen table, the silkscreen information of the memory to be processed can also be determined by using the association relationship between the location information of the memory and the chassis silkscreen information corresponding to the location information. The specific process includes steps B1 to B3.
[0179] Step B1, acquiring the memory information of the memory to be processed in the server;
[0180] Step B2, determining the association relationship corresponding to the memory information from the virtual topology graph based on the memory information. The virtual topology graph is determined based on the memory information of each memory in the server and the association relationship corresponding to the memory information. The association relationship is determined based on the association between the location information of the memory and the chassis silkscreen information corresponding to the location information.
[0181] Specifically, the position information of the memory can be the slot number information of the memory on the memory backplane. Associating the position information of the memory with the chassis silk screen information corresponding to the position information is actually to associate the slot of the memory with the corresponding chassis silk screen information. The silk screen information of the server records the specific position information of the slots of the plurality of disk arrays in the server. After obtaining the slot information of the memory with the positioning function in the server chassis, the specific position of the slot in the server chassis can be checked in the chassis silk screen information, so as to realize quick positioning of the memory.
[0182] In step B3, the silk screen information of the to-be-processed memory is determined based on the association relationship.
[0183] Specifically, the silk screen information of the server records the slot sequence information of the disk arrays in the server and the physical position information of each slot information in the chassis, which is usually recorded in the form of a card and placed in the server so that the operation and maintenance personnel can obtain and check. After determining the association relationship and the chassis silk screen information of the server, the slot number of the to-be-processed memory in the chassis silk screen information of the server can be determined. Based on the slot number and the specific position information of the slot number in the chassis recorded in the chassis silk screen information, the specific position of the to-be-processed memory in the chassis of the server can be determined.
[0184] In this embodiment, based on the pre-constructed virtual topology graph, quick positioning of the to-be-processed memory can be realized, which facilitates the maintenance personnel to replace the memory and other maintenance operations, and improves the positioning efficiency of the to-be-processed memory.
[0185] In some optional embodiments, after generating the alarm information containing the position information, the method further comprises:
[0186] Restarting the server and re-determining the to-be-detected memory component corresponding to the position information in the alarm information;
[0187] Re-detecting the to-be-detected memory component, and if the to-be-detected memory component has no fault, modifying the topology setting option of the to-be-detected memory component in the first setting interface to the second preset value and deleting the preset word;
[0188] Modifying the available memory capacity of the to-be-detected memory component in the second setting interface to the fourth preset value and deleting the preset word.
[0189] Specifically, after the server OS system generates the alarm information containing the position information, the user or the server operation and maintenance personnel will repair the faulty memory, for example, cleaning the gold finger surface of the to-be-processed memory or replacing the to-be-processed memory.
[0190] After the failed memory is repaired, the server is restarted, the slot corresponding to the location information in the alarm information is determined, and the memory component inserted in the slot is referred to as a to-be-detected memory component. The server BIOS system re-detects the to-be-detected memory component. If the to-be-detected memory component has no fault, it is indicated that the repair of the failed memory is successful.
[0191] The first setting interface is, for example, a BIOS Setup interface. The second setting interface is, for example, a BMC Web interface. The second preset value is, for example, Enable. The preset word is, for example, a fault word. If the to-be-detected memory component has no fault, the to-be-detected memory component can be enabled in the server. Therefore, the server BIOS system modifies the topology setting option of the to-be-detected memory component in the BIOS Setup interface to Enable and deletes the fault word. The server BIOS system records the above operation in a BIOS log.
[0192] After the server OS system reads the BIOS log and confirms that the repair of the failed memory is successful, the available memory capacity of the to-be-detected memory component in the BMC Web interface is modified to a fourth preset value, and the fault word is deleted. The fourth preset value is, for example, 0 to 100% of the memory capacity of the to-be-detected memory component. The specific value is set according to actual needs.
[0193] In the embodiment, the to-be-detected memory component corresponding to the location information in the alarm information is re-detected, and it is judged whether the repair of the failed memory is completed. If the to-be-detected memory component has no fault, it is indicated that the failed memory is successfully repaired. The fault mark of the to-be-detected memory in the first setting interface and the second setting interface is deleted, and the to-be-detected memory is re-enabled. A mechanism for locating and repairing the failed memory is provided.
[0194] In some optional embodiments, after the to-be-closed memory is closed, the method further includes:
[0195] Obtaining the available memory capacity of the memory component from the second setting interface;
[0196] Taking the memory component with a non-zero available memory capacity as a to-be-trained component;
[0197] In the memory training process of the memory component, only the to-be-trained component is subjected to memory training.
[0198] Specifically, when the memory training (Memory Training) is performed in the server Post stage, if it is detected that a memory is closed, the memory training and adjustment optimization are not performed on the memory, so as to avoid the waste of resource occupation.
[0199] The second setting interface is, for example, a BMC Web interface. The server OS system can obtain the available memory capacity of each memory component of the server from the BMC Web interface. The memory component with zero available memory capacity in the second setting interface is the closed memory component, and the memory training is not needed for the closed memory component. The server OS system takes the memory component with non-zero available memory capacity as the to-be-trained component. The server OS system controls the BMC to write the information of the to-be-trained component into the SPD component, and the server BIOS system determines the to-be-trained component when reading the SPD component. The server BIOS system performs the memory training on only the to-be-trained component in the memory training process of the memory component.
[0200] The above process is shown in FIG. 3. When starting, the memory is trained in the post process, and it is determined whether the memory is set to 0G. If not, after entering the SETUP interface, it is detected that the closed memory capacity is displayed as 0, and the option value is in the disable state. If yes, the closed memory is not adjusted and optimized, and after entering the SETUP interface, it is detected that the closed memory capacity is displayed as 0, and the option value is in the disable state. The above process is shown in FIG. 4. In the post process, the memory is trained, and it is determined whether the memory is 0. If yes, the memory with 0 is not optimized, and is directly skipped to save resources. After the self-check is completed, it is checked whether the memory is successfully closed in the setup interface. If not, the memory is adjusted and optimized, and after the self-check is completed, it is checked whether the memory is successfully closed in the setup interface.
[0201] In the embodiment, in the memory training process of the memory component, only the to-be-trained component with non-zero available memory capacity is trained, the memory training process is simplified, the memory training time is saved, and the waste of server resources is avoided.
[0202] In the embodiment, a memory management apparatus is also provided, which is used to implement the above embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.
[0203] The embodiment provides a memory management apparatus, as shown in FIG. 6, which includes:
[0204] The obtaining module 601 is configured to obtain attribute information of the memory component in the server.
[0205] The generating module 602 is configured to generate a setting option of the memory component in a first setting interface according to the attribute information.
[0206] The determining module 603 is configured to determine the memory to be closed in a case where the memory stability test needs to be performed on the server.
[0207] The closing module 604 is configured to modify a setting option of the memory to be closed to a first preset value, and close the memory to be closed.
[0208] In some optional embodiments, after the memory to be closed is closed, the apparatus is configured to:
[0209] obtain a total capacity of the memory of the server;
[0210] determine whether the total capacity of the memory is a sum of memory capacities of the started memories, wherein the memories other than the memory to be closed in the memory component are the started memories;
[0211] obtain an available memory capacity of the memory to be closed in the second setting interface;
[0212] determine whether the available memory capacity of the memory to be closed is zero;
[0213] if the total capacity of the memory is the sum of the memory capacities of the started memories and the available memory capacity of the memory to be closed is zero, it is determined that the memory to be closed is successfully closed.
[0214] In some optional embodiments, the generating module 602 generates the setting option of the memory component in the first setting interface according to the attribute information, and the generating module 602 includes:
[0215] determining parameter information and topology information of the memory component according to the attribute information;
[0216] generating a parameter setting option corresponding to the parameter information and a topology setting option corresponding to the topology information in the first setting interface, wherein the parameter setting option and the topology setting option are included in the setting option.
[0217] In some optional embodiments, the closing module 604 modifies the setting option of the memory to be closed to the first preset value to close the memory to be closed, and the closing module 604 includes:
[0218] modifying the topology setting option of the memory to be closed to the first preset value;
[0219] the server is configured to, when the topology setting option is the first preset value, subtract the memory capacity of the memory to be closed from the total capacity of the memory of the server, and modify the available memory capacity of the memory to be closed in the second setting interface to zero.
[0220] In some optional embodiments, after the setting option of the memory component is generated in the first setting interface according to the attribute information, the apparatus is further configured to:
[0221] enter the first setting interface after the server is started.
[0222] determine whether the topology setting option of the memory component exists in the first setting interface;
[0223] if the topology setting option exists, determine whether the topology setting option can be set to the second preset value and the first preset value;
[0224] if the topology setting option can be set to the second preset value and the first preset value, determine that the setting option is generated successfully.
[0225] In some optional embodiments, the obtaining module 601 obtains attribute information of the memory component in the server, including:
[0226] performing preset detection on the memory component to obtain a detection result;
[0227] obtaining the attribute information of the memory component from the detection result.
[0228] In some optional embodiments, after generating the setting option of the memory component in the first setting interface according to the attribute information, the apparatus is further configured to:
[0229] in a power-on self-test stage of the server, determining whether a faulty memory is detected;
[0230] if the faulty memory is detected, modifying the topology setting option of the faulty memory in the first setting interface to a third preset value, and marking the topology setting option of the faulty memory with a preset label, wherein the preset label is used to determine that the memory component corresponding to the topology setting option is the faulty memory;
[0231] modifying the available memory capacity of the faulty memory in the second setting interface to zero, and marking the available memory capacity of the faulty memory with the preset label.
[0232] In some optional embodiments, after modifying the available memory capacity of the faulty memory to zero and marking the available memory capacity of the faulty memory with the preset label, the apparatus is further configured to:
[0233] if a memory crash occurs in the process of performing the power-on self-test on the server, entering the second setting interface;
[0234] determining whether a memory component with zero available memory capacity and marked with the preset label exists in the second setting interface;
[0235] if the memory component with zero available memory capacity and marked with the preset label exists, taking the memory component as a to-be-handled memory;
[0236] determining position information of the to-be-handled memory, and generating alarm information containing the position information.
[0237] In some optional embodiments, the apparatus is further configured to:
[0238] acquire memory location silk screen information of the memory component;
[0239] generate a string containing the memory location silk screen information, and store the string in a silk screen table, wherein the silk screen table is used to locate the memory component.
[0240] In some optional embodiments, the apparatus determines the location information of the memory to be processed, including:
[0241] query the memory location silk screen information of the memory to be processed in the silk screen table;
[0242] use the memory location silk screen information of the memory to be processed as the location information.
[0243] In some optional embodiments, after generating the alarm information containing the location information, the apparatus is further configured to:
[0244] restart the server, and re-determine the memory component to be detected corresponding to the location information in the alarm information;
[0245] re-detect the memory component to be detected, if the memory component to be detected has no fault, modify the topology setting option of the memory component to be detected in the first setting interface to the second preset value, and delete the preset word;
[0246] modify the available memory capacity of the memory component to be detected in the second setting interface to the fourth preset value, and delete the preset word.
[0247] In some optional embodiments, after closing the memory to be closed, the apparatus is further configured to:
[0248] acquire the available memory capacity of the memory component from the second setting interface;
[0249] use the memory component with the available memory capacity other than zero as the memory component to be trained;
[0250] In the memory training process of the memory component, only the memory component to be trained is trained.
[0251] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding embodiments, and will not be described here.
[0252] The memory management apparatus in the embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories executing one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0253] The embodiment of the present application further provides a computer device having the memory management apparatus shown in Fig. 6.
[0254] Referring to Fig. 7, Fig. 7 is a structural schematic diagram of a computer device according to an optional embodiment of the present application. As shown in Fig. 7, the computer device comprises one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively connected with each other by using different buses, and can be installed on a common mainboard or in other manners as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or buses can be used together with multiple memories and multiple memory, if needed. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). One processor 10 is taken as an example in Fig. 7.
[0255] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.
[0256] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0257] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; and the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device by a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0258] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the memory 20 can further include a combination of the above kinds of memories.
[0259] The computer device also comprises a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0260] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code originally stored in a remote storage medium or non-transitory machine readable storage medium and downloaded to a local storage medium and stored in the local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0261] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be invoked or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the way of computer program instructions executed by a computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0262] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the present application.
Claims
1. A memory management method characterized by comprising: The method comprises: obtaining attribute information of a memory component in a server; generating a setting option of the memory component in a first setting interface according to the attribute information; determining a memory to be closed in response to a memory stability test on the server; and modifying the setting option of the memory to be closed to a first preset value, and closing the memory to be closed.
2. The method of claim 1, wherein, After the memory to be closed is closed, the method further comprises: obtaining a total capacity of the memory of the server; judging whether the total capacity of the memory is a sum of memory capacities of the started memories other than the memory to be closed in the memory component; obtaining a corresponding available memory capacity of the memory to be closed in a second setting interface; judging whether the available memory capacity of the memory to be closed is zero; and determining that the memory to be closed is successfully closed in response to the total capacity of the memory being the sum of the memory capacities of the started memories and the available memory capacity of the memory to be closed being zero.
3. The method of claim 1, wherein, The generating of the setting option of the memory component in the first setting interface according to the attribute information comprises: determining parameter information and topology information of the memory component according to the attribute information; and generating a parameter setting option corresponding to the parameter information and a topology setting option corresponding to the topology information in the first setting interface, wherein the parameter setting option and the topology setting option are contained in the setting option.
4. The method of claim 3, wherein, The modifying of the setting option of the memory to be closed to the first preset value and the closing of the memory to be closed comprise: modifying the topology setting option of the memory to be closed to the first preset value; wherein the server is configured to subtract the memory capacity of the memory to be closed from the total capacity of the memory of the server, and modify the available memory capacity of the memory to be closed in the second setting interface to zero when the topology setting option is the first preset value.
5. The method of claim 3, wherein, After the generating of the setting option of the memory component in the first setting interface according to the attribute information, the method further comprises: entering the first setting interface after the server is started; judging whether the topology setting option of the memory component exists in the first setting interface; judging whether the topology setting option can be set to a second preset value and the first preset value in response to the topology setting option existing in the first setting interface; and determining that the generation of the setting option is successful in response to the topology setting option being able to be set to the second preset value and the first preset value.
6. The method of claim 1, wherein, The obtaining of the attribute information of the memory component in the server comprises: performing a preset detection on the memory component to obtain a detection result; and obtaining the attribute information of the memory component from the detection result.
7. The method of claim 3, wherein, After the generating of the setting option of the memory component in the first setting interface according to the attribute information, the method further comprises: judging whether a faulty memory is detected in a power-on self-test stage of the server; in response to detecting the faulty memory, modifying a topology setting option of the faulty memory in a first setting interface to a third preset value, and marking the topology setting option of the faulty memory with a preset word, wherein the preset word is used to determine that a memory component corresponding to the topology setting option is a faulty memory; and modifying available memory capacity of the faulty memory in a second setting interface to zero, and marking the available memory capacity of the faulty memory with the preset word.
8. The method of claim 7, wherein, After the modifying of the available memory capacity of the faulty memory in the second setting interface to zero and the marking of the available memory capacity of the faulty memory with the preset word, the method further comprises: in response to occurrence of a memory outage in a power-on self-test process of the server, entering the second setting interface; determining whether there is a memory component with available memory capacity of zero and marked with the preset word in the second setting interface; in response to the presence of the memory component with available memory capacity of zero and marked with the preset word in the second setting interface, taking the memory component with available memory capacity of zero and marked with the preset word as a to-be-handled memory; and determining position information of the to-be-handled memory, and generating alarm information containing the position information.
9. The method of claim 8, wherein, The method further comprises: obtaining memory position silk screen information of the memory component; and generating a character string containing the memory position silk screen information, and storing the character string in a silk screen table, wherein the silk screen table is used to locate the memory component.
10. The method of claim 9, wherein, The determining of the position information of the to-be-handled memory comprises: inquiring the memory position silk screen information of the to-be-handled memory in the silk screen table; and taking the memory position silk screen information of the to-be-handled memory as the position information.
11. The method of claim 8, wherein, After the generating of the alarm information containing the position information, the method further comprises: restarting the server, and re-determining a to-be-detected memory component corresponding to the position information in the alarm information; re-detecting the to-be-detected memory component, in response to the absence of a fault in the to-be-detected memory component, modifying a topology setting option of the to-be-detected memory component in a first setting interface to a second preset value, and deleting the preset word; and modifying available memory capacity of the to-be-detected memory component in a second setting interface to a fourth preset value, and deleting the preset word.
12. The method of claim 4, wherein, After the closing of the to-be-closed memory, the method further comprises: obtaining available memory capacity of the memory component from the second setting interface; taking a memory component with available memory capacity other than zero as a to-be-trained component; and in a memory training process of the memory component, only training the to-be-trained component.
13. The method of claim 1, wherein, The attribute information of the memory component comprises one or more of memory capacity, memory position, memory rate, and topology relationship.
14. The method of claim 1, wherein, The first setting interface is a BIOS Setup interface, and the generating of the setting option of the memory component in the first setting interface according to the attribute information comprises: setting a start flag bit and an end flag bit in the BIOS Setup interface; and Updating the attribute information into a BIOS option according to the start flag and the end flag, and updating the BIOS option to a designated position of a Setup interface.
15. The method of claim 1, wherein, The memory stability test of the server comprises testing the stability of the memory and the performance of the server when 1 / 2 of the memory is opened, testing the stability of the memory and the performance of the server when 1 / 4 of the memory is opened, and testing the stability of the memory and the performance of the server when 1 / 8 of the memory is opened. The determining of the memory to be closed comprises: In response to the test of the stability of the memory and the performance of the server when 1 / 2 of the memory is opened, determining that 1 / 2 of the memory components to be closed as the memory to be closed; in response to the test of the stability of the memory and the performance of the server when 1 / 4 of the memory is opened, determining that 3 / 4 of the memory components to be closed as the memory to be closed; and In response to the test of the stability of the memory and the performance of the server when 1 / 8 of the memory is opened, determining that 7 / 8 of the memory components to be closed as the memory to be closed. The 1 / 2 of the memory components to be closed, the 3 / 4 of the memory components to be closed, and the 7 / 8 of the memory components to be closed are set by demand information or randomly.
16. The method of claim 2, wherein, The method further comprises: In response to the total capacity of the memory being greater than the sum of the capacities of the started memories, determining that the memory to be closed is not completely closed; and In response to the total capacity of the memory being less than the sum of the capacities of the started memories, determining that the server is faulty.
17. The method of claim 2, wherein, The second setting interface is a BMC Web interface, and the available memory capacity of each memory component in the server is displayed in the second setting interface. The method further comprises: In response to the available memory capacity of the memory to be closed being not zero, determining that the memory to be closed is not completely closed.
18. A memory management device, comprising: The apparatus comprises: An acquisition module configured to acquire attribute information of memory components in a server; A generation module configured to generate setting options of the memory components in a first setting interface according to the attribute information; A determination module configured to determine a memory to be closed in response to a memory stability test of the server; and A closing module configured to modify the setting option of the memory to be closed to a first preset value and close the memory to be closed.
19. A computer device, comprising: The apparatus comprises: A memory and a processor in communication connection with each other, the memory storing computer readable instructions, and the processor executing the computer readable instructions to perform the memory management method in any one of claims 1 to 17.
20. A non-transitory computer readable storage medium, comprising: The computer readable storage medium stores computer readable instructions for causing a computer to perform the memory management method in any one of claims 1 to 17.
Citation Information
Patent Citations
BIOS starting method, starting system and related device
CN109408130A
Server memory function test method, system and device and storage medium
CN115470054A
RMT option configuration method and device, equipment and storage medium
CN116467124A
Fault reporting method, system and device, electronic equipment and storage medium
CN118672832A
Memory management method and device, computer equipment and storage medium
CN118860671A