Use a Flash Drive or an SD card as Ram?

InvaderSumo

Member
Joined
Apr 25, 2024
Messages
87
Reaction score
11
Credits
836
So it's been talked about before. Theirs some YouTube videos about it for windows.... Using an SD card or flash drive as Random Access Memory...
But is it possible for Linux???
 


Maybe these will explain.


 
@The Duck ... I have no intention of using a USB drive as RAM. But is there a benefit to doing so? I looked at those 2 links you offered up. Seems it works but kills your USB much quicker and isn't nearly as fast as onboard. Is it just one of those things people do when they HAVE to have more available for a short time?
 
How about using some Ram as Ram...that's what it's for.
1714099586860.gif
 
@The Duck ... I have no intention of using a USB drive as RAM. But is there a benefit to doing so? I looked at those 2 links you offered up. Seems it works but kills your USB much quicker and isn't nearly as fast as onboard. Is it just one of those things people do when they HAVE to have more available for a short time?
They say there's supposed to be a speed increase from what I remember from back in the day when this was all a rage.
How about using some Ram as Ram...that's what it's for. View attachment 19597
I have to agree with @bob466 if you need more memory than install more memory as memory is cheap.

More memory and a SSD will make even my old clunkers lightening fast.

Yes by using your USB as swap partition, but this is not RAM, ram is way faster than flash drives.
As @CaffeineAddict said ram is faster than flash drives.

I run Easy OS as a frugal install which loads and runs from ram every session and it lightening fast.
 
I have to agree with @bob466 if you need more memory than install more memory as memory is cheap.
If you don't have the money to spend on ram just use zram because sd card's are slow.
 
when i lsblk into my terminal... it doesnt show a zram file... does that mean i need t create one first... guy on opensource seemed like he already had that file on his computer unaware?
 
Please post system specs.

Open the terminal and copy and paste this command and post the displayed results.

Code:
inxi -Fxz

Knowing system specs will help other to give solutions.
 
Please post system specs.

Open the terminal and copy and paste this command and post the displayed results.

Code:
inxi -Fxz

Knowing system specs will help other to give solutions.
System:
Kernel: 6.1.0-20-amd64 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
Desktop: GNOME v: 43.9 Distro: Debian GNU/Linux 12 (bookworm)
Machine:
Type: Laptop System: GPU product: GWTC116-2 v: N/A
serial: <superuser required>
Mobo: GPU model: GPU Company serial: <superuser required> UEFI: N/A
v: LC-BI-11.6-Y116GRX510-680-A date: 10/14/2022
Battery:
ID-1: BAT0 charge: 41.0 Wh (98.1%) condition: 41.8/41.8 Wh (100.0%)
volts: 8.5 min: N/A model: WB SR 1 WB Lion Battery status: discharging
CPU:
Info: dual core model: Intel Celeron N4020 bits: 64 type: MCP
arch: Goldmont Plus rev: 8 cache: L1: 112 KiB L2: 4 MiB
Speed (MHz): avg: 800 min/max: 800/2800 cores: 1: 800 2: 800
bogomips: 4377
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel GeminiLake [UHD Graphics 600] driver: i915 v: kernel
arch: Gen-9 bus-ID: 00:02.0
Device-2: Microdia USB 2.0 Camera type: USB driver: uvcvideo bus-ID: 1-8:4
Display: wayland server: X.Org v: 1.22.1.9 with: Xwayland v: 22.1.9
compositor: gnome-shell driver: dri: iris gpu: i915
resolution: 1366x768~60Hz
API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics 600 (GLK
2) direct-render: Yes
Audio:
Device-1: Intel Celeron/Pentium Silver Processor High Definition Audio
driver: snd_hda_intel v: kernel bus-ID: 00:0e.0
API: ALSA v: k6.1.0-20-amd64 status: kernel-api
Server-1: PipeWire v: 0.3.65 status: active
Network:
Message: No PCI device data found.
IF-ID-1: wlx8812ac2c09d7 state: up mac: <filter>
Bluetooth:
Device-1: Realtek 802.11n WLAN Adapter type: USB driver: btusb,rtw_8723du
bus-ID: 1-7:3
Report: hciconfig ID: hci0 rfk-id: 1 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Drives:
Local Storage: total: 58.25 GiB used: 18.18 GiB (31.2%)
ID-1: /dev/mmcblk0 model: ARV11X size: 58.25 GiB
Partition:
ID-1: / size: 55.6 GiB used: 18.16 GiB (32.7%) fs: ext4 dev: /dev/mmcblk0p2
ID-2: /boot/efi size: 511 MiB used: 5.8 MiB (1.1%) fs: vfat
dev: /dev/mmcblk0p1
Swap:
ID-1: swap-1 type: partition size: 976 MiB used: 17 MiB (1.7%)
dev: /dev/mmcblk0p3
Sensors:
System Temperatures: cpu: 54.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 210 Uptime: 24m Memory: 3.4 GiB used: 2.47 GiB (72.7%)
Init: systemd target: graphical (5) Compilers: gcc: 12.2.0 Packages: 1690
Shell: Bash v: 5.2.15 inxi: 3.3.26
 
so i have a problem....

debian@debian:~$ sudo apt install zram-config
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package zram-config
debian@debian:~$ snap install zram-config
error: snap "zram-config" not found
 
I tell you that the gnome desktop environment you are using is a real system resource hog and uses a lot of memory.

Finding a Linux distro with a lighter weight desktop environment would improve your Linux experience.
 
so i have a problem....

debian@debian:~$ sudo apt install zram-config
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package zram-config
debian@debian:~$ snap install zram-config
error: snap "zram-config" not found
When installing software on debian my advice is to always google out this:
debian <software name> package

For instance to find zram you google for "debian zram package" and you get this:


Then copy correct package name from wep page and install it:

Bash:
sudo apt install zram-tools

Finding a Linux distro with a lighter weight desktop environment would improve your Linux experience.
yes.

but it was such a pain trying to get wifi to work after installation :(((((
it wasn't really, all you had to do is run 4 commands to compile and install the driver.

But you can switch to different desktop, like lxde which consumes the least hardware resources but it's not as shiny or as cool or as easy to use as other desktops.
 
When installing software on debian my advice is to always google out this:


For instance to find zram you google for "debian zram package" and you get this:


Then copy correct package name from wep page and install it:

Bash:
sudo apt install zram-tools


yes.


it wasn't really, all you had to do is run 4 commands to compile and install the driver.

But you can switch to different desktop, like lxde which consumes the least hardware resources but it's not as shiny or as cool or as easy to use as other desktops.
probably why ill stick with gnome... again thanks for yalls help... i got zram up and running using this website.... gonna restart know then check my ram usage when restarted https://www.techrepublic.com/article/how-to-enable-the-zram-module-for-faster-swapping-on-linux/
 
Does anyone else find it really interesting that we use some of our RAM (as buffers) to make our slow disks seem really fast (if horribly expensive) and some of our disk space (as swap) to make our RAM seem really huge (if horribly slow) and we do both of these things at the same time - and it actually works?

In this day of cheap and large RAM, swap space is often neglected but I like to () configure at least a little bit of swap space just in case I would actually run out of free RAM (*) - if I start actually using the swap and things slow to a crawl, I'll know to investigate (but the system won't crash). Other than that, using mass storage as RAM just seems like a bad idea. I don't have much experience with SSDs, but I'd bet that even swap on a fast SSD would be an order of magnitude slower than actual RAM.

*) "like to" and "remember to" not being the same. ;)
**) My home directory lives in RAM so if I run out of RAM it's probably my own fault
 
Does anyone else find it really interesting that we use some of our RAM (as buffers) to make our slow disks seem really fast (if horribly expensive) and some of our disk space (as swap) to make our RAM seem really huge (if horribly slow) and we do both of these things at the same time - and it actually works?

In this day of cheap and large RAM, swap space is often neglected but I like to () configure at least a little bit of swap space just in case I would actually run out of free RAM (*) - if I start actually using the swap and things slow to a crawl, I'll know to investigate (but the system won't crash). Other than that, using mass storage as RAM just seems like a bad idea. I don't have much experience with SSDs, but I'd bet that even swap on a fast SSD would be an order of magnitude slower than actual RAM.

*) "like to" and "remember to" not being the same. ;)
**) My home directory lives in RAM so if I run out of RAM it's probably my own fault
it is one of those which came first, the chicken or the egg scenarios.... LMAOOOO thats why we just buy more CHICKENS(ram) LMAOOOO
 
also i did the zram thing..... and for some reason everything seems a lot smoother. so what i did was use 650 mb of one of GB of ram. and it got compressed so now it fits more memory inside of the small 650 mg... really weird in my opinion. its like a world inside of a world. dangerous in my opinion. i bet the engineers who dev ram disks and what stay away from this specific conundrum because even to me.. its quite dangerously intriguing.
 

Members online


Top