- Timestamp:
- Nov 13, 2022, 11:57:43 PM (2 years ago)
- Branches:
- master
- Children:
- 197867d
- Parents:
- 709b33e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/en/posts/ram-fix.org
r709b33e rebbbf4f 43 43 44 44 ** How to understand that RAM is broken 45 The most expected way to see RAM fail is [[https://computerhope.com/beep.htm][BIOS signal ling]] that it is46 broken. It should beep using PC Speaker a special signal. You can read47 your motherboard manual to understand what does it mean. Usually it48 means that computer won't start with"completely" broken RAM module.45 The most expected way to see RAM fail is [[https://computerhope.com/beep.htm][BIOS signaling]] that it is 46 broken. It should beep a special signal using a PC Speaker. You can read 47 your motherboard manual to understand what it mean. Usually, it means 48 that the computer won't start with a "completely" broken RAM module. 49 49 50 If system loads just fine, but you experience problems along the way51 such as random segfaults and programs crash es, kernel panicsand so on,50 If the system loads just fine, but you experience problems along the way 51 such as random segfaults and programs crash, kernel panics, and so on, 52 52 you might have broken segments of RAM. To detect such segments you can 53 53 use several programs listed below. RAM checking is usually not a fast 54 process, so you will probably need to le ftyour device running for54 process, so you will probably need to leave your device running for 55 55 several hours. 56 56 57 57 *** Memtest86+ 58 Memtest86+ runs from grub menu before your OS. It needs to run in such59 way because it needs whole range of RAM and your system can use a range 60 of ram and would not allow to properly check it. It runs a lot of checks 61 and checks every segment of your ram. While checking it logs the list of 62 broken segmentsthat you can write down.58 Memtest86+ runs from the Grub menu before running your OS. It needs to 59 run in such way because it needs the whole range of RAM and your running 60 system is using that RAM range. It runs a lot of checks and checks every 61 segment of your ram. While checking it logs the list of broken segments 62 that you can write down. 63 63 64 64 You can install it using your GNU+Linux package manager such as apt. The 65 65 package is usually called ~memtest86+~. But there is a small caveat. If 66 you use old version it wont work on UEFI systems.66 you use the old version it won't work on UEFI systems. 67 67 68 68 If it doesn't work you can download memtest86+ newer version 69 distribution to your usbstick and load memtest from that. It should70 work on UEFI and BIOS systems. It can be downloaded from offical69 distribution to your USB stick and load memtest from that. It should 70 work on UEFI and BIOS systems. It can be downloaded from the offical 71 71 website. 72 72 … … 75 75 *** Memtester 76 76 It has the same purpose as memtest86+, but it runs while your system is 77 running, so it doesn't check whole RAM range, but only specified free78 ram available at your system at the moment of running this program. It 79 can be installed using your package manager of choice by typing 80 ~memtester~ aspackage name.77 running, so it doesn't check the whole RAM range, but only specified 78 free ram available at your system at the moment of running this 79 program. It can be installed using your package manager of choice by 80 typing ~memtester~ as a package name. 81 81 82 82 [[[https://pyropus.ca./software/memtester/][Official Website]]] … … 89 89 error, congratulations! You don't have any problems with your RAM. 90 90 91 If it shows small amountof errors like one or two, you can let Linux92 Kernel ignore such segments of RAM, so programs do esn't use such broken93 segments and programs work stable all the time. You need to use for that94 ~memmap~kernel argument in your grub configuration. For example:91 If it shows a small number of errors like one or two, you can let Linux 92 Kernel ignore such segments of RAM, so programs don't use such broken 93 segments and work stable all the time. You need to use for that ~memmap~ 94 kernel argument in your grub configuration. For example: 95 95 ~memmap=0x100000$762ce9c38420,0x100000$34e03060,0x100000$87fce060,0x100000$23c63060,0x100000$87b6c060~. There 96 96 is also grub config unit called ~GRUB_BADRAM~, but it looks like it is 97 deprecated and memmap is pref fered.97 deprecated and memmap is prefered. 98 98 99 99 For more details about blacklisting bad segments of RAM read [[https://unix.stackexchange.com/questions/75059/how-to-blacklist-a-correct-bad-ram-sector-according-to-memtest86-error-indicati][this 100 100 comprehensive Stack Overflow answer]]. 101 101 102 If it shows huge amountof errors, like many thousand, it means that103 probably one of your sticks of RAM arebroken. To detect which one is104 broken exactly you can probably figure it out looking at addresses or105 running another test using specific stick(s) of RAM and seeing if errors102 If it shows a big number of errors, like many thousand, it means that 103 probably one of your sticks of RAM is broken. To detect which one is 104 broken exactly you can probably figure it out by looking at addresses or 105 running another test using a specific stick(s) of RAM and seeing if errors 106 106 are gone. 107 107 108 Be aware, that if you le ft with one RAM stick there is a chance, that it109 will only boot in specific RAM slot. Read your motherboard manual if 110 something doesn't work.108 Be aware, that if you leave with one RAM stick there is a chance, that 109 it will only boot in a specific RAM slot. Read your motherboard manual 110 if something doesn't work. 111 111 112 112 If you have a RAM memory stick with tons of errors, you can try to 113 113 repair it. I can't tell how exactly it is being done and why it is done 114 114 in the way it should be done. You can find videos on fixing RAM sticks 115 on YouTube and other resources. Here is [[https://youtu.be/KVR91p-Bd6M][the link to one of such video s]].115 on YouTube and other resources. Here is [[https://youtu.be/KVR91p-Bd6M][the link to one of such video]]. 116 116 117 117 ** RAM Optimizations of GNU+Linux system 118 If your RAM was broken and you left with much less memory tha tyou118 If your RAM was broken and you left with much less memory than you 119 119 expected, don't run and buy new RAM sticks. There is a chance that even 120 120 with less RAM the system will work completely fine. Linux is pretty good 121 at working on low end machines and it has different ways to handle lack 122 of memory. It is often situation to have devices that outperform their 123 tasks in modern world, like working on gaming laptop with very powerful 124 CPU and GPU, that are used mostly to render text in a text editor. 121 at working on low-end machines and it has different ways to handle a 122 lack of memory. There is often a situation in a modern world, when a 123 person has devices that outperform their tasks, like working on gaming 124 laptop with very powerful CPU and GPU, that are used mostly to render 125 text in a text editor. 125 126 126 127 *** Swap 127 Swap is a partition on your hard drive that is being used in situation128 Swap is a partition on your hard drive that is being used in a situation 128 129 when there is no RAM left. It is used for other reasons too and such 129 130 partition is recommended to have on most GNU+Linux systems. 130 131 131 132 You can configure how often linux system will use swap changing 132 ~swappiness~. You can read about changing that setting and tolearn about133 ~swappiness~. You can read about changing that setting and learn about 133 134 swap in general in the link below. 134 135 … … 146 147 147 148 *** Less bloat software 148 Also as a lternative way you can simply use less bloat software, so you149 don't need so much RAM in the first place. In many cases good software 150 doesn't require a lot of RAM, but bad software always leak memory, so 151 you would need many GiBs of RAM to use it properly. The most bloated 152 software is a web-browser such as chromium and firefox and browser-based153 apps done in electron such as Slack, VSCode and other proprietary 154 pro ducts.149 Also as an alternative way you can simply use less bloat software, so 150 you don't need so much RAM in the first place. In many cases, good 151 software doesn't require a lot of RAM, but bad software always leaks 152 memory, so you would need many GiBs of RAM to use it properly. The most 153 bloated software is a web browser such as chromium and firefox and 154 browser-based apps done in electron such as Slack, VSCode, and other 155 proprietary products. 155 156 156 157 ** Conclusions
Note:
See TracChangeset
for help on using the changeset viewer.