Announcement

Collapse
No announcement yet.

Memory problem and tmpfs?

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

    Memory problem and tmpfs?

    I am having memory problems. I cannot use Firefox for Netflix (pb opened in another post) and Chrome devours memory. Or Firefox. Or tmpfs.

    What the dickens is tmpfs?

    $ df
    Filesystem 1K-blocks Used Available Use% Mounted on
    tmpfs 801884 2008 799876 1% /run
    /dev/sdb2 71670904 22017352 45967152 33% /
    tmpfs 4009404 190888 3818516 5% /dev/shm
    tmpfs 5120 16 5104 1% /run/lock
    efivarfs 128 49 75 40% /sys/firmware/efi/efivars
    tmpfs 4009404 14992 3994412 1% /tmp
    /dev/sda4 205315524 131339188 63474192 68% /home/jon/jon-files
    /dev/sda1 245996 14325 231671 6% /boot/efi
    /dev/sdc6 51422028 3846712 44937492 8% /samba-transfer
    /dev/sdc4 361044028 228352160 114325404 67% /home/jon/our-pix
    /dev/sdc5 206233028 146688512 49042372 75% /home/jon/music-mp3
    tmpfs 801880 136 801744 1% /run/user/1000
    If I interpret this correctly, it's using twice 4G! For what?
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    The output is easier to read if you use CODE tags instead of QUOTE tags. Also, use the -h switch (human readable) with df. (df -h)

    So, would you kindly redo the command as df -h then copy and paste between CODE tags.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Originally posted by joneall View Post
      I am having memory problems. I cannot use Firefox for Netflix (pb opened in another post) and Chrome devours memory. Or Firefox. Or tmpfs.

      What the dickens is tmpfs?



      If I interpret this correctly, it's using twice 4G! For what?
      Tmpfs is a file system which keeps all of its files in virtual memory​ and there is not wrong in your case.

      Did you enabled DRM content playback in Firefox?
      • In the General panel, scroll below to the Digital Rights Management (DRM) Content section.
      • Tick the check mark next to Play DRM-controlled content.

      Comment


        #4
        I used quote because every page tells us not to use code.

        Yes, I have enabled DRM.

        Code:
        $ df -h
        Filesystem      Size  Used Avail Use% Mounted on
        tmpfs           784M  2,0M  782M   1% /run
        /dev/sdb2        69G   21G   44G  33% /
        tmpfs           3,9G  217M  3,7G   6% /dev/shm
        tmpfs           5,0M   16K  5,0M   1% /run/lock
        efivarfs        128K   49K   75K  40% /sys/firmware/efi/efivars
        tmpfs           3,9G   22M  3,9G   1% /tmp
        /dev/sda4       196G  126G   61G  68% /home/jon/jon-files
        /dev/sda1       241M   14M  227M   6% /boot/efi
        /dev/sdc6        50G  3,7G   43G   8% /samba-transfer
        /dev/sdc4       345G  218G  110G  67% /home/jon/our-pix
        /dev/sdc5       197G  140G   47G  75% /home/jon/music-mp3
        tmpfs           784M  132K  783M   1% /run/user/1000
        What are those tmpfs's with 9G of my precious memory? I only have 8!
        'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

        Comment


          #5
          Originally posted by joneall View Post
          I used quote because every page tells us not to use code.

          Yes, I have enabled DRM.

          Code:
          $ df -h
          Filesystem Size Used Avail Use% Mounted on
          tmpfs 784M 2,0M 782M 1% /run
          tmpfs 3,9G 217M 3,7G 6% /dev/shm
          tmpfs 5,0M 16K 5,0M 1% /run/lock
          tmpfs 3,9G 22M 3,9G 1% /tmp
          tmpfs 784M 132K 783M 1% /run/user/1000
          What are those tmpfs's with 9G of my precious memory? I only have 8!
          Where did you see 9G? If you have only 8 G of memory ram you can disable tpmfs on /tmp. This is the only folder that can allocate definitely memory ram and in your case it is 3,9 GB. Check your etc/fstab and if it is the case you are going to see something like this there :
          tmpfs /tmp tmpfs noatime,mode=1777 0 0

          Comment with # or erase the line.

          Comment


            #6
            "only 8 G of memory"?
            I've always thought that was a lot! Is memory hogging by apps inflating as fast as that?

            Should I double it again?

            In fact, I used to have a partition which was mounted as /tmp. Is that not done any more? I'll have to look for it. Without tmpfs or a partition, I'm afraid it will start gnawing on my root volume.
            Last edited by joneall; Oct 28, 2024, 12:39 AM.
            'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

            Comment


              #7
              I have now added an honest-to-gosh partition for /tmp, but it still wants to use a tmpfs.

              Code:
              [FONT=monospace][COLOR=#000000]$ df [/COLOR]
              Filesystem      Size  Used Avail Use% Mounted on
              tmpfs           784M  2,0M  782M   1% /run
              /dev/sda2        69G   14G   51G  22% /
              tmpfs           3,9G     0  3,9G   0% /dev/shm
              tmpfs           5,0M   16K  5,0M   1% /run/lock
              efivarfs        128K   57K   67K  46% /sys/firmware/efi/efivars
              /dev/sdb4       6,4G  132K  6,0G   1% /tmp
              /dev/sda1       241M   14M  227M   6% /boot/efi
              /dev/sda4       196G   35G  152G  19% /home/jon/jon-files
              /dev/sdc4       345G  218G  110G  67% /home/jon/our-pix
              /dev/sdc5       197G  140G   47G  75% /home/jon/music-mp3
              /dev/sdc6        50G  3,7G   43G   8% /samba-transfer
              tmpfs           784M  100K  783M   1% /run/user/1000
              /dev/sdd1       916G  480G  390G  56% /media/jon/lix-baka[/FONT]
              How can I stop it?
              'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

              Comment


                #8
                Originally posted by joneall View Post
                I've always thought that was a lot! Is memory hogging by apps inflating as fast as that?

                Should I double it again?

                In fact, I used to have a partition which was mounted as /tmp. Is that not done any more? I'll have to look for it. Without tmpfs or a partition, I'm afraid it will start gnawing on my root volume.
                No worries. I have a system with 32 GB of memory ram. Most of the times it used 4 GB of memory ram. Most of the times it doesn't even use swap. Only in special cases it use to use more than 5 GB of memory ram.

                More memory ram is important of course, but it depends of your usage. Video or photo edition works better with more memory ram for example.

                I could see you are afraid about tmpfs. Look, tmpfs is a file system that reside in memory ram. In the specif case of /tmp you can use tmpfs on it, and temporary files will reside in memory ram. In the other way it will be on the hard disk os SSD or even other kind of storage.

                Do you really need the temporary files to be in memory ram? Most of the times ... No. But...again, it depends of your usage.

                For example: i have a specific program that use /tmp when transfer a lot of files. So, i decided to use tmpfs on /tmp because memory ram is faster compared to the hard disk. I checked the usage and choose 8 GB of my memory ram to be used on /tmp as a tmpfs. But like i said only in special case, because most of the times it use 40 MB. In my case, i have 32 GB, so i decided to allocate 8 GB for that special case.

                In the case of /tmp using tmpfs it allocate by default a half of memory ram. In your case 4 GB. You can change this on etc/fstab , specifying a number for it. You need to monitoring what you really need if you want to use tmpfs on /tmp, because if tmpfs is not enough it will going to use swap.

                So, the question is : Do you really need tmpfs on /tmp ?

                Look at your /tmp now. Since you remove it from tmpfs on etc/fstab it now resides on /dev/sdb4 and continues to use 1% . And what filesystem? That you choose for your system like ext4, btrfs, or any other.
                ​​​
                Last edited by Virginio Miranda; Oct 28, 2024, 07:10 AM.

                Comment


                  #9
                  Originally posted by joneall View Post
                  I have now added an honest-to-gosh partition for /tmp, but it still wants to use a tmpfs.

                  Code:
                  [FONT=monospace][COLOR=#000000]$ df [/COLOR]
                  Filesystem Size Used Avail Use% Mounted on
                  tmpfs 784M 2,0M 782M 1% /run
                  /dev/sda2 69G 14G 51G 22% /
                  tmpfs 3,9G 0 3,9G 0% /dev/shm
                  tmpfs 5,0M 16K 5,0M 1% /run/lock
                  efivarfs 128K 57K 67K 46% /sys/firmware/efi/efivars
                  /dev/sdb4 6,4G 132K 6,0G 1% /tmp
                  /dev/sda1 241M 14M 227M 6% /boot/efi
                  /dev/sda4 196G 35G 152G 19% /home/jon/jon-files
                  /dev/sdc4 345G 218G 110G 67% /home/jon/our-pix
                  /dev/sdc5 197G 140G 47G 75% /home/jon/music-mp3
                  /dev/sdc6 50G 3,7G 43G 8% /samba-transfer
                  tmpfs 784M 100K 783M 1% /run/user/1000
                  /dev/sdd1 916G 480G 390G 56% /media/jon/lix-baka[/FONT]
                  How can I stop it?
                  You can't and you don't need to do that. Dont worries about the others tmpfs. The system need to use them in this way.
                  ​​​​​​
                  Tmpfs is a file system which keeps all of its files in virtual memory.
                  Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost.

                  tmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains.

                  In your case look at the Use% ... Only 1% of memory ram.

                  If you want to check the total amount of memory ram consumed by all tmpfs filesystems go to the / proc/meminf and look at the Shmem field. You will be surprised that most of the times it uses a low amount of memory ram.​

                  Comment


                    #10
                    Ok, I doubled my RAM; my motherboard is maxed out now with 16 GB. Everything works ok, but I still don't understand why the boost in memory usage by Firefox and Chrome with 6.2.
                    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                    Comment

                    Working...
                    X