Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Muovere XDG in tmpfs
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
saverik
Guru
Guru


Joined: 18 Oct 2008
Posts: 381

PostPosted: Mon May 31, 2021 8:36 pm    Post subject: Muovere XDG in tmpfs Reply with quote

Ciao a tutti,
per risparmiare scritture sul mio nvme vorrei spostare la cache di firefox in tmpfs visto che ho anche 32 Gb di Ram.
Allego il mio fstab :
Code:

#<fs>         <mountpoint>   <type>      <opts>      <dump/pass>

#/dev/nvme0n1p1         /boot           auto            defaults                 0 0
/dev/nvme0n1p2         /               ext4            defaults,relatime        0 1
/dev/nvme0n1p3         /home           ext4            defaults                 0 2
#
tmpfs           /tmp            tmpfs           size=26G,noatime        0 0
tmpfs           /var/tmp        tmpfs           size=26G,noatime        0 0
tmpfs      /var/tmp/portage      tmpfs   size=24G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev   0 0[quote][/quote]


Ben accetti consigli su come aggiustare il mio fstab visto la quantità enorme di ram.
Saluti
_________________
Dell_7490 i5-8350u ,32GbRam,Adata8200proNvme512Gb
Linux= Gentoo64bit+Kde_Plasma+systemd
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Wed Jun 02, 2021 9:39 am    Post subject: Reply with quote

speculare a quanto indicato ,decidi la quantità (esempio 2g)
in mount point ~/.cache/mozilla

oppure tutta la cache ~/.cache

~ --> /home/<user>

opzioni : size=2G,noatime,default

occhio che se il valore della cache è sottodimensionato , essendo quest'ultima variabile , potresti avere dei malfunzionamenti ai programmi che la usano (idem per il solo firefox)

Mia cache di esempio
Code:
42M     /home/*/.cache/mozilla
933M    /home/*/.cache

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
saverik
Guru
Guru


Joined: 18 Oct 2008
Posts: 381

PostPosted: Wed Jun 02, 2021 1:33 pm    Post subject: Reply with quote

Vediamo un pò se ho capito bene: (dici che5Gb sono tanti per uso normale?)
e per il fstab modificheresti qualcosa?



Code:
#<fs>         <mountpoint>   <type>      <opts>      <dump/pass>

#/dev/nvme0n1p1         /boot           auto            defaults                 0 0
/dev/nvme0n1p2         /               ext4            defaults,relatime        0 1
/dev/nvme0n1p3         /home           ext4            defaults                 0 2
#
tmpfs           /tmp            tmpfs           size=26G,noatime        0 0
tmpfs           /var/tmp        tmpfs           size=26G,noatime        0 0
tmpfs      /var/tmp/portage      tmpfs   size=24G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev   0 0
tmpfs      /home/saverik/*/.cache      tmpfs   size=5G,noatime,defaults 0 0

[quote][/quote]

_________________
Dell_7490 i5-8350u ,32GbRam,Adata8200proNvme512Gb
Linux= Gentoo64bit+Kde_Plasma+systemd
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Jun 02, 2021 1:58 pm    Post subject: Reply with quote

saverik wrote:
Vediamo un pò se ho capito bene: (dici che5Gb sono tanti per uso normale?)

Non sempre
Code:
1.1G    ~/.cache/mozilla
6.2G    ~/.cache

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
saverik
Guru
Guru


Joined: 18 Oct 2008
Posts: 381

PostPosted: Wed Jun 02, 2021 2:18 pm    Post subject: Reply with quote

Code:



#<fs>         <mountpoint>   <type>      <opts>      <dump/pass>

#/dev/nvme0n1p1         /boot           auto            defaults                 0 0
/dev/nvme0n1p2         /               ext4            defaults,relatime        0 1
/dev/nvme0n1p3         /home           ext4            defaults                 0 2
#
tmpfs           /tmp            tmpfs           size=20G,noatime        0 0
tmpfs           /var/tmp        tmpfs           size=20G,noatime        0 0
tmpfs      /var/tmp/portage      tmpfs   size=20G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev   0 0
tmpfs      /home/saverik/*/.cache      tmpfs   size=10G,noatime,defaults 0 0[quote][/quote]


modificato un po tutto.. va bene il fstab?
_________________
Dell_7490 i5-8350u ,32GbRam,Adata8200proNvme512Gb
Linux= Gentoo64bit+Kde_Plasma+systemd
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Jun 02, 2021 2:40 pm    Post subject: Reply with quote

Se funziona va bene :P.
Pensandoci un po' io ho 6G di cache ma non l'ho mai cancellata, quindi mettendola in tmpfs questa viene cancellata ad ogni reboot quindi puoi diminuire a 5G come prima.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Wed Jun 02, 2021 6:06 pm    Post subject: Reply with quote

Code:
 /home/saverik/*/.cache


l'asterisco dovresti toglierlo. anche
Code:
[quote][/quote]
nell'fstab , se non è un refuso di copia/incolla.

"*" l'ho messo per indicare "utente" qualsiasi ovviamente da modificare a seconda delle prorpie esigenze :P

Per quanto ne so , da un bel pò , firefox ha la cache in memoria di default (dovresti controllare about:config ---> browser.cache.memory.enable --> true) , ma non prendere per oro colato questa affermazione.

comunque qualcosa va a scrivere nel disco di sicuro.


Code:
ls -lh ~/.cache/mozilla/firefox/uyauka5z.default
totale 24K
drwx------ 4 saba saba 4,0K  1 apr 20.46 cache2
drwx------ 2 saba saba 4,0K  1 apr 20.47 OfflineCache
drwxr-xr-x 3 saba saba 4,0K  2 giu 20.09 safebrowsing
drwx------ 3 saba saba 4,0K  1 apr 20.46 settings
drwxr-xr-x 2 saba saba 4,0K  2 giu 11.08 startupCache
drwx------ 2 saba saba 4,0K  2 giu 13.30 thumbnails



In tmpfs
Code:
grep moz /etc/fstab
tmpfs           /home/saba/.cache/mozilla                tmpfs   size=512M,noatime        0 0


Code:
 df -h -t tmpfs | grep moz
tmpfs           512M   11M    502M   2% /home/saba/.cache/mozilla

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2489
Location: イタリアのロディで

PostPosted: Thu Jun 10, 2021 12:12 pm    Post subject: Reply with quote

io ho seguito il wiki
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
saverik
Guru
Guru


Joined: 18 Oct 2008
Posts: 381

PostPosted: Sun Jun 20, 2021 8:40 pm    Post subject: Reply with quote

Buonasera Ragazzi,

mi ricollego solo ora in quanto sono stato via per lavoro quindi mi scuso per il ritardo.

in allegato il fstab corretto con i suggermenti di sabayonino ma ho tenuto 10G vista la grande quantità di ram a disposizione



Code:


#/dev/nvme0n1p1         /boot           auto            defaults                 0 0
/dev/nvme0n1p2         /               ext4            defaults,relatime        0 1
/dev/nvme0n1p3         /home           ext4            defaults                 0 2
#
tmpfs           /tmp            tmpfs           size=26G,noatime        0 0
tmpfs           /var/tmp        tmpfs           size=26G,noatime        0 0
tmpfs      /var/tmp/portage      tmpfs   size=24G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev   0 0
efivarfs                /sys/firmware/efi/efivars  efivarfs      rw,nosuid,nodev,noexec,relatime      0 0
shm                     /dev/shm                   tmpfs         defaults                             0 0
tmpfs                   /dev/shm                   tmpfs         defaults                             0 0
tmpfs      /home/saverik/.cache      tmpfs   size=10G,noatime,defaults 0 0

_________________
Dell_7490 i5-8350u ,32GbRam,Adata8200proNvme512Gb
Linux= Gentoo64bit+Kde_Plasma+systemd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum