Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. ultimate storage hack

ultimate storage hack

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
16 Posts 11 Posters 2 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H [email protected]

    Good luck with your 256 characters.

    B This user is from outside of this forum
    B This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #7

    255, generally, because null termination. ZFS does 1023, the argument not being "people should have long filenames" but "unicode exists", ReiserFS 4032, Reiser4 3976. Not that anyone uses Reiser, any more. Also Linux' PATH_MAX of 4096 still applies. Though that's in the end just a POSIX define, I'm not sure whether that limit is actually enforced by open(2)... man page speaks of ENAMETOOLONG but doesn't give a maximum.

    It's not like filesystems couldn't support it it's that FS people consider it pointless. ZFS does, in principle, support gigantic file metadata but using it would break use cases like having a separate vdev for your volume's metadata. What's the point of having (effectively) separate index drives when your data drives are empty.

    brahvim@lemmy.kde.socialB 1 Reply Last reply
    1
    • K [email protected]

      I had a manager once tell me during a casual conversation with complete sincerity that one day with advancements in compression algorithms we could get any file down to a single bit. I really didn't know what to say to that level of absurdity. I just nodded.

      spacecadet@feddit.nlS This user is from outside of this forum
      spacecadet@feddit.nlS This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #8

      You can give me any file, and I can create a compression algorithm that reduces it to 1 bit. (*)

      ::: spoiler spoiler
      (*) No guarantees about the size of the decompression algorithm or its efficacy on other files
      :::

      L 1 Reply Last reply
      0
      • B [email protected]

        255, generally, because null termination. ZFS does 1023, the argument not being "people should have long filenames" but "unicode exists", ReiserFS 4032, Reiser4 3976. Not that anyone uses Reiser, any more. Also Linux' PATH_MAX of 4096 still applies. Though that's in the end just a POSIX define, I'm not sure whether that limit is actually enforced by open(2)... man page speaks of ENAMETOOLONG but doesn't give a maximum.

        It's not like filesystems couldn't support it it's that FS people consider it pointless. ZFS does, in principle, support gigantic file metadata but using it would break use cases like having a separate vdev for your volume's metadata. What's the point of having (effectively) separate index drives when your data drives are empty.

        brahvim@lemmy.kde.socialB This user is from outside of this forum
        brahvim@lemmy.kde.socialB This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #9

        ...Just asking, just asking: Why is the default FILENAME_MAX on Linux/glibc 4096?

        B 1 Reply Last reply
        0
        • System shared this topic on
        • brahvim@lemmy.kde.socialB [email protected]

          ...Just asking, just asking: Why is the default FILENAME_MAX on Linux/glibc 4096?

          B This user is from outside of this forum
          B This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #10

          Because PATH_MAX is? Also because it's a 4k page.

          FILENAME_MAX is not safe to use for buffer allocations btw it could be INT_MAX.

          brahvim@lemmy.kde.socialB 1 Reply Last reply
          0
          • B [email protected]

            Because PATH_MAX is? Also because it's a 4k page.

            FILENAME_MAX is not safe to use for buffer allocations btw it could be INT_MAX.

            brahvim@lemmy.kde.socialB This user is from outside of this forum
            brahvim@lemmy.kde.socialB This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #11

            Thanks! Got an answer and not 200 downvotes. This is why I love Lemm-Lemm.

            1 Reply Last reply
            0
            • tetris11@lemmy.mlT [email protected]

              each file is minimum 4kb

              (base64.length/max_character) * min_filesize < actual_file_size

              For this to pay off

              V This user is from outside of this forum
              V This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #12

              Just use folders instead 😏

              1 Reply Last reply
              1
              • tetris11@lemmy.mlT [email protected]

                each file is minimum 4kb

                (base64.length/max_character) * min_filesize < actual_file_size

                For this to pay off

                L This user is from outside of this forum
                L This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #13

                each file is minimum 4kb

                $ touch empty_file
                $ ls -l
                total 8
                -rw-rw-r-- 1 user group 0 may 14 20:13 empty_file
                $ wc -c empty_file 
                0 empty_file
                

                Huh?

                tetris11@lemmy.mlT 1 Reply Last reply
                1
                • spacecadet@feddit.nlS [email protected]

                  You can give me any file, and I can create a compression algorithm that reduces it to 1 bit. (*)

                  ::: spoiler spoiler
                  (*) No guarantees about the size of the decompression algorithm or its efficacy on other files
                  :::

                  L This user is from outside of this forum
                  L This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #14

                  Here's a simple command to turn any file into a single b!

                  echo a > $file_name
                  
                  1 Reply Last reply
                  0
                  • L [email protected]

                    each file is minimum 4kb

                    $ touch empty_file
                    $ ls -l
                    total 8
                    -rw-rw-r-- 1 user group 0 may 14 20:13 empty_file
                    $ wc -c empty_file 
                    0 empty_file
                    

                    Huh?

                    tetris11@lemmy.mlT This user is from outside of this forum
                    tetris11@lemmy.mlT This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #15

                    Oh, I'm thinking folders aren't I. Doy....

                    L 1 Reply Last reply
                    0
                    • tetris11@lemmy.mlT [email protected]

                      Oh, I'm thinking folders aren't I. Doy....

                      L This user is from outside of this forum
                      L This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #16

                      It seems those are 4 KiB on Linux, interesting to know.

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups