Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can I put /var on a RAMDISK

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I put /var on a RAMDISK

#21 Post by p.H »

jmgibson1981 wrote: 2022-08-01 02:25 Just 2 drives in the same vg.

Code: Select all

vgcreate main /dev/sda2 /dev/sdb2
This does not tell anything about the LV allocation layout. It depends on the lvcreate command parameters.
jmgibson1981 wrote: 2022-08-01 15:41 /dev/sda2:
Timing buffered disk reads: 802 MB in 3.01 seconds = 266.83 MB/sec

/dev/sdb2:
Timing buffered disk reads: 752 MB in 3.01 seconds = 250.23 MB/sec
This is quite slow from a SSD. Could it be that the SATA interface (host side or SSD side) is limited to 3.0 Gb/s ?

Code: Select all

smartctl -i /dev/sda

jmgibson1981
Posts: 295
Joined: 2015-06-07 14:38
Has thanked: 11 times
Been thanked: 32 times

Re: Can I put /var on a RAMDISK

#22 Post by jmgibson1981 »

Never did anything special with teh lv. Still learning it.

Code: Select all

lvcreate -n arch-home -L +20g /dev/main
But I did run that command.

Code: Select all

$ sudo smartctl -i /dev/sda
[sudo] password for jason: 
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.18.15-arch1-1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Crucial/Micron Client SSDs
Device Model:     CT250MX500SSD1
Serial Number:    
LU WWN Device Id: 
Firmware Version: M3CR023
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Aug  1 18:28:11 2022 MST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

[jason@archwrecker ~]$ sudo smartctl -i /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.18.15-arch1-1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Phison Driven SSDs
Device Model:     KINGSTON SA400S37120G
Serial Number:    
LU WWN Device Id: 
Firmware Version: SBFKB1H5
User Capacity:    120,034,123,776 bytes [120 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
TRIM Command:     Available
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-3 T13/2161-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Aug  1 18:28:43 2022 MST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Nevermind, thank you for helping me find it with minimal thread derailing. This machine needs an upgrade big time. Ports on mobo are Sata2 and the pcix1 slot is covered by the dual slot gpu... who thought next to the main x16 was the best place for the only other pcix slot. Mystery solved.

User avatar
craigevil
Posts: 5391
Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times

Re: Can I put /var on a RAMDISK

#23 Post by craigevil »

If you have the ram putting parts of var in tmpfs doesn't hurt anything.
This is what my fstab looks like:

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=2693ab94-01  /boot           vfat    defaults,flush    0       2
PARTUUID=2693ab94-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
# Added 4 lines to use RAM instead of SSD for temp and log files
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I put /var on a RAMDISK

#24 Post by p.H »

craigevil wrote: 2022-08-02 15:16 If you have the ram putting parts of var in tmpfs doesn't hurt anything
Maybe it does not hurt your use case, but it hurts those who rely on these locations being persistent (as per the FHS).

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Can I put /var on a RAMDISK

#25 Post by bw123 »

larienna wrote: 2022-07-26 13:20 ...since I only have 1 Gig of RAM
Not a good idea
resigned by AI ChatGPT

Post Reply