Announcement

Collapse
No announcement yet.

How to enlarge tmpfs with encrypted disk?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to enlarge tmpfs with encrypted disk?

    I'm running pspp on Kubuntu 22.04, and getting a lot of
    Code:
     error: writing to temporary file: No space left on device
    I need to enlarge my tmpfs, but the examples I have found are inapplicable because my /etc/fstab has no "tmpfs" line. This may be because the disk is encrypted.
    An alternative might be to direct pspp to use temporary space on the main hard disk, but their documentation is not helpful.
    Any suggestions?

    #2
    A temporary file does not at all mean it is using the ephemeral tmpfs , which is in RAM, not your drive. It most likely is using a temp file on your hard drive. Your root partition, or wherever pspp is creating the file, is out of space. If it IS using tmpfs, then the fstab instructions ARE valid, since it is created in RAM, and the parameters used set the amount of ram it is using.

    use df-h for a rough listing of how much space you actually have (including tmpfs), and Filelight can be used to visually see what is taking up your physical drive space

    Comment


      #3
      I guess I was too summary in describing my problem. In fact, I had used df-h to see that tmpfs totals 3.2G, and before I started pspp only 1% of this was used. As pspp ran, reading a large file, use of tmpfs expanded eventually reaching 100%.( I might note this 3.2G tmpfs partition is one of five tmpfs partitions shown in df), I don't know for an actual fact that this is in RAM, but wherever if is I need to make it bigger. df-h also shows me that I have more than 2.5T empty space on my main disk. I have 32G of RAM, of which only a bit more than half gets used as the pspp program crashes.
      I've found some instructions for increasing tmpfs. Some are rather dated, all seem to assume there is already a tmpfs line in the fstab, and they seem highly specific to the flavor of linux (which is why I'm asking in the kubuntu forum).
      I do want to thank claydoh for taking the time to look at this. It may be that the problem needs to be solved in pspp, or by substituting some other application.

      Comment


        #4
        tmpfs is in ram. See my link. A custom fstab line can be used if one wants to make it a specific size, instead of letting the system do it. There doesn't need to be an existing line. The kernel automatically limits the size, which is half your total ram and swap, I think. An fstab entry overrides that. So it would be very easy to test it out, and then revert it back if needed. The format for the entry hasn't changed, so even older references are valid here.

        Your main disk may have space, what what about any specific partitions, if any? A separate /home or other location?

        From your error message, how do you know for sure it about tmpfs and not some tmp file or directory? Are there other lines before or near this that can help pinpoint this, perhaps? Most if not all files will be in your /home dirs. As this tool can be run on things like a Raspberry Pi, I doubt it is the massive amount of tmpfs space you can have compared tho those tiny things.

        Also:
        https://forums.ppsspp.org/index.php




        Comment


          #5
          Originally posted by taxpayer View Post
          I guess I was too summary in describing my problem. In fact, I had used df-h to see that tmpfs totals 3.2G, and before I started pspp only 1% of this was used. As pspp ran, reading a large file, use of tmpfs expanded eventually reaching 100%.( I might note this 3.2G tmpfs partition is one of five tmpfs partitions shown in df), I don't know for an actual fact that this is in RAM, but wherever if is I need to make it bigger. df-h also shows me that I have more than 2.5T empty space on my main disk. I have 32G of RAM, of which only a bit more than half gets used as the pspp program crashes.
          I've found some instructions for increasing tmpfs. Some are rather dated, all seem to assume there is already a tmpfs line in the fstab, and they seem highly specific to the flavor of linux (which is why I'm asking in the kubuntu forum).
          I do want to thank claydoh for taking the time to look at this. It may be that the problem needs to be solved in pspp, or by substituting some other application.
          This is just an idea allright? I dont know and dont use pspp, but i will try:

          It seems that pspp is writing its temporary files in /tmp instead of the correct path. This fulfill /tmp very quickly. Worst than that is if /tmp is using tmpfs file system, because like claydoh said it is in ram, so expand tmpfs is not the solution for you or the program itself. Maybe a temporary solution could be to disable tmpfs on /tmp and /tmp could use the hard disk space and not the ram.

          pspp is a free replacement for the proprietary program SPSS​ from IBM and in the past i could see the same troubleshooting:

          https://www.ibm.com/support/pages/sp...ead-spsstmpdir


          and in pspp too ( in the past ):

          https://lists.gnu.org/archive/html/b.../msg00000.html

          Programs that use /tmp has to be smart enough to delete the temporary files when not required anymore. Take a look at the link above.

          Good luck.

          In time: Maybe ( i am not sure ) increase the swap file or swap partition can help you.Try.
          Last edited by Virginio Miranda; Oct 13, 2024, 11:47 PM.

          Comment


            #6
            OP, have you tried the obvious, setting TMPDIR to somewhere in the 2.5 TB spare space? Virginio Miranda has linked to a bug report from 2010 where pspp is not honouring TMPDIR, but that was 2010, the bug may have been fixed since then.

            Now, you say that "tmpfs" is running out of space, and that there are several tmpfs showing in df. This Kubuntu 24.04 has 4, and none of them are /tmp, and IIUC they're all different. Which of yours is running out of space? (If it's /dev/shm that would suggest a memory leak.)
            Regards, John Little

            Comment


              #7
              jlittle ,

              Since the OP said that tpmfs has 3.2 G before he started pspp and only 1% of this was used, and as soon as pspp ran, reading a large file, use of tmpfs expanded eventually reaching 100%, i suspect he is talking about tmpfs /run/user/xxxx

              taxpayer , read above and if it is the case there is one way you can enlarge this tmpfs: setting RuntimeDirectorySize in /etc/systemd/logind.conf​ .By default, 10% of physical memory is used.This is why you see 3.2G. You need to uncomment the # and reboot the system to take effect.

              look at 4.3 in this link:

              https://wiki.archlinux.org/title/Profile-sync-daemon#I_need_more_memory_to_accommodate_my_profil e.2Fprofiles_in_.2Frun.2Fuser.2Fxxxx._How_can_I_al locate_more.3F

              From logind.conf manpage:

              RuntimeDirectorySize=

              Sets the size limit on the $XDG_RUNTIME_DIR runtime directory for each user who logs in. Takes a size in bytes, optionally suffixed with the usual K, G, M, and T suffixes, to the base 1024 (IEC). Alternatively, a numerical percentage suffixed by "%" may be specified, which sets the size limit relative to the amount of physical RAM. Defaults to 10%. Note that this size is a safety limit only. As each runtime directory is a tmpfs file system, it will only consume as much memory as is needed.

              https://man.archlinux.org/man/logind.conf.5
              Last edited by Virginio Miranda; Oct 14, 2024, 10:17 PM.

              Comment


                #8
                Virginio Miranda, thanks for your very clear and helpful suggestion. I uncommented the line (wonder why it was commented out?), changed 10% to 40%, rebooted and the total size of tmpfs/run/user/1000 went from 3251440 to 13005768. I unfortunately had dismantled the program that was causing the problem, with workarounds to shrink the needed file size, but clearly this is the solution. (It also explains why I never saw kubuntu using more than about half the system's memory.)

                Comment


                  #9
                  taxpayer ,

                  I suggest you to return to the default since you will no longer use the pspp program. Comment this line. That 10% is a safe number for most users. I only suggest you to change this number to solve your problem with the pspp, but I think the program itself has some problem with data handling. It's obvious that having the data in RAM using tmpfs is more efficient than on a hard disk drive or an SSD, but unless you don't have any swap partition or swap file, it's strange that from the moment the error appeared : writing to temporary file: No space left on device, the system has not used the swap partition.
                  I have tmpfs on /tmp .I have 32 GB like you and did a separate 8GB in etc/fstab. The system uses half by default; 16 GB. In my case I choose tmpfs on /tmp because I have a program (PHP) that specifically uses this directory and 8GB is more than enough. i never change the other tmpfs directory. The way it is fixed ( 10% in case of /run/user/xxxx) is more than enough for my usage. I don't have enough experience to say whether changing the size of RuntimeDirectorySize will allocate 40% of ram memory ( in your example ). In the case of using tmpfs in the /tmp directory, I know that it allocates.​

                  Comment

                  Working...
                  X