[SOLVED] how to increase tmpfs size limit

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 9th, '13, 20:03

I cannot install a program [netflix] because the tmpfs size is limited to 236 meg (or 245?] and runs out of room during the sh command

I have looked everywhere to find a way to increase tmpfs size (limited by making it in ram? and therefor half of actual ram I am supposing)

I tried setting tpmfs in fstab (holy, I am so brave) didnt wreck my system but ended up just "another" of many tmpfs's

dh -f shows several

Code: Select all
Filesystem      Size  Used Avail Use% Mounted on
rootfs           12G  4.0G  7.2G  36% /
devtmpfs        236M     0  236M   0% /dev
tmpfs           1.0G  1.2M 1023M   1% /dev/shm
tmpfs           245M  416K  245M   1% /run
/dev/sda1        12G  4.0G  7.2G  36% /
tmpfs           245M     0  245M   0% /sys/fs/cgroup
tmpfs           245M   12K  245M   1% /tmp
/dev/sda6        22G  2.3G   20G  11% /home


The first tmpfs in the list is the new one I added in fstab to no avail, install still fails with out of room to write, and so probably still using one of the limited ones

so I intend to remove it from fstab, and I have come to ask whats going on, so what can I do to install the netflix player on the kids old [weak low ran] computer
Last edited by canadaist on Nov 11th, '13, 21:01, edited 3 times in total.
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: how to increase tmpfs size limit

Postby doktor5000 » Nov 10th, '13, 00:26

RAM is probably 512MB?
When increasing the size of tmpfs, you also lose RAM.

You could try as root via
Code: Select all
mount /tmp -o remount,size=400000

That would change the size online to ~400MB
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18071
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: how to increase tmpfs size limit

Postby Ken-Bergen » Nov 10th, '13, 03:01

There should be and likely is a way to turn off tmpfs and use a /tmp on the hard drive.
It would ease the pain for those with old systems and little ram but lots of free disk space.
It would be slower at times but one does what one must with old systems.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 07:41

There should be and likely is a way to turn off tmpfs and use a /tmp on the hard drive.
It would ease the pain for those with old systems and little ram but lots of free disk space.
It would be slower at times but one does what one must with old systems.
Ken


I hope for this, I'd like to see what common use makes of the extra ram, even with the loss of a ram held tmp file.

I am looking into the multiple tmpfs mounts I have.

On the good Doktor's suggestion

Code: Select all
mount /tmp -o remount,size=400000


thanks, that'll do it for the install problem, so I'll mark it closed?
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 15:32

Just for the post solution readers, I am supposing that the solution sets the size of all the not-set-by-fstab tmpfs sizes as sub sets of the /tmp size setting (I have four tmpfs, one set by fstab)

I will continue to find a way to turn off or toggle the ram held /tmp because of its limited size. Increasing the size of /tmp probably reduces ram available for other purposes.
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 16:27

Sorry I marked it as closed before applying the proposed solution

Code: Select all
mount /tmp -o remount,size=400000


which (on reflection, of course) produces a /tmp file of 400k
I used instead
Code: Select all
    mount /tmp -o remount,size=400000000

and that produces a /tmp file of 400 meg, actually does the job, typos are important

I will mark it as closed later
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby doktor5000 » Nov 10th, '13, 18:43

Whoops, sorry, cut too many zeros off :oops:

This is what it looks like here, with the correct values (for my box)

Code: Select all
[doktor5000@Mageia3 ~]$ sudo mount /tmp -o remount,size=3000000000
[doktor5000@Mageia3 ~]$ df /tmp
Filesystem      Size  Used Avail Use% Mounted on
none            2.8G  104K  2.8G   1% /tmp


EDIT:
Seconding Ken's post, it's probably a better idea to create a separate filesystem on disk
for /tmp as even 512M would be too small for some installations or bigger stuff.
I'd suggest creating a 2GB filesystem for /tmp to be on the safe side.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18071
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 18:52

If the system is using ram to hold tmp, if I set it too large wont it eat all ram? or does it ignore "use ram" if I set /tmp to 2gig with mount?

edit [ I have set it to 390meg, install is still going well, will return it to 240-260 later]

Or, again, are you agreeing with the ability to toggle "use ram" during such things as this install? (so it CAN be set to 2 gig)
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby doktor5000 » Nov 10th, '13, 19:09

Well, tmpfs can only hold as much data as big as your RAM + swap is. So if you set it to 2GB, it will be full
at 512MB plus the amount of swap minus the RAM that your system has currently allocated.

But with RAM that size your want to avoid swapping, so best put /tmp on a separate filesystem.

What does the "free" command show on your box?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18071
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 19:56

Code: Select all
free
             total       used       free     shared    buffers     cached
Mem:        501400     275648     225752          0      26596     186500
-/+ buffers/cache:      62552     438848
Swap:      3020184          0    3020184


As it has been rebooted recently there is no mount command altering auto-set tmpfs size
I think this prog I'm trying to get running needs ram, and probably that old machine cant do it
but I'd like to toggle off tmpfs, ram held /tmp, see if the swap&ram combo can do what
the ram held tmp cannot.

How do set tmp to the hard drive, turn off / toggle tmpfs in ram?
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby jiml8 » Nov 10th, '13, 20:51

Please be aware that /tmp and tmpfs are not the same. A tmpfs is a ramdisk, while /tmp is a volume that can be mounted in that ramdisk.

I had the same problem you are having, though I have more memory. See this thread for the solution: viewtopic.php?f=8&t=5616&hilit=%2Ftmp+in+RAM
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 21:19

Right, that is a great thread on my exact problem [wonder why my search didnt find it before i posted]

If I understand correctly
Re: Mounting /tmp

Unread postby jiml8 » Jul 17th, '13, 20:20
Well, I bypassed the tmp.conf file as called out in the manpage, and I commented out all the mount stuff in tmp.mount. That, hopefully, should do it.

First bypass the tmp.conf file [sorry how?]
then edit tmp.mount to comment out all mount commands
then symlink /tmp to a file [directory] somewhere else on the hard drive? [if its not mounted on tmpfs why don't I just create /tmp ?] mkdir /tmp as root and reboot
1) do I need to do something for size, or does the symlink in your setup allow growth/shrinkage
2) configuration for keeping it emptyish? after boot or dynamically or .. dont want it just growing

or do I re-install and watch for (and reject) the 'choice' that sets up the tmpfs method
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby jiml8 » Nov 10th, '13, 21:58

What I actually did was comment out three lines in the file /usr/lib/systemd/system/tmp.mount like this:

Code: Select all
#What=tmpfs
#Where=/tmp
#Type=tmpfs
#Options=mode=1777,strictatime


Then, I went to the directory /etc/systemd/system and added the link "ln -s '/dev/null' '/etc/systemd/system/tmp.mount'

I just went back and looked and it seems that a subsequent update to systemd replace the tmp.mount file with a copy that did not have things commented out, AND removed the symlink from /etc/systemd/system. However, my /tmp is still mounted on the hard drive where I want it; I have no idea why.

I am now a bit more sophisticated with systemd than I was before, so I replaced the symlink by using the command: "systemtctl mask tmp.mount". This caused systemctl to write the symlink for me and, presumably, to make some entry someplace in its internal structures to prevent it from being removed later.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby jiml8 » Nov 10th, '13, 22:03

Oh, also...

I symlink /tmp because my system partition is not encrypted and every other partition on the computer is encrypted. So I move /tmp someplace secure. I don't mount /tmp because I don't want to dedicate an entire partition to /tmp. I don't create a virtual volume on another partition because that virtual volume is limited in size; if /tmp overflows it things break, and if /tmp doesn't overflow it I have wasted the space. I just define a directory named tmp on another volume, symlink to it, and that works fine. It grows and shrinks as needed and the remainder of the volume is accessible to me to use as I wish.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 10th, '13, 22:12

REMIND ME: If we are talking about putting tmp on a "separate file system' does that mean off the root [ / ] partition.. and in this old comp's case on the home partition? or are we just talking about off the encrypted file system?

so I replaced the symlink by using the command: "systemtctl mask tmp.mount".


this a permanent command that isnt overwritten on boot? Once done its done?

I can do this in /usr/lib/systemd/system/tmp.mount
Code: Select all
#What=tmpfs
#Where=/tmp
#Type=tmpfs
#Options=mode=1777,strictatime


and since my disks are not yet encrypted I can just create /tmp and reboot?

so three step process 1) the systemctl command, 2) edit tmp.mount and 3) mkdir /tmp with correct permissions? oops 4) reboot
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28

Re: [NOT SOLVED] how to increase tmpfs size limit

Postby canadaist » Nov 11th, '13, 21:00

I guess I'll mark this as solved now
canadaist
 
Posts: 228
Joined: May 7th, '11, 17:28


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest