Assign program its own swap drive












3















I'm trying to render something with blender, but it's taking 20gb of RAM! I don't have that, so I just plug in a 60gb usb stick, and mount it as swap space.



The problem is that now I can't really use my computer for anything since traditional RAM is completely full all the time.



Is it possible to assign blender to use JUST swap? Or just the usb stick (/dev/sdf1)?










share|improve this question





























    3















    I'm trying to render something with blender, but it's taking 20gb of RAM! I don't have that, so I just plug in a 60gb usb stick, and mount it as swap space.



    The problem is that now I can't really use my computer for anything since traditional RAM is completely full all the time.



    Is it possible to assign blender to use JUST swap? Or just the usb stick (/dev/sdf1)?










    share|improve this question



























      3












      3








      3


      2






      I'm trying to render something with blender, but it's taking 20gb of RAM! I don't have that, so I just plug in a 60gb usb stick, and mount it as swap space.



      The problem is that now I can't really use my computer for anything since traditional RAM is completely full all the time.



      Is it possible to assign blender to use JUST swap? Or just the usb stick (/dev/sdf1)?










      share|improve this question
















      I'm trying to render something with blender, but it's taking 20gb of RAM! I don't have that, so I just plug in a 60gb usb stick, and mount it as swap space.



      The problem is that now I can't really use my computer for anything since traditional RAM is completely full all the time.



      Is it possible to assign blender to use JUST swap? Or just the usb stick (/dev/sdf1)?







      swap memory-usage blender






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 30 at 19:27







      joek204

















      asked Nov 2 '17 at 13:57









      joek204joek204

      274




      274






















          3 Answers
          3






          active

          oldest

          votes


















          2














          About swapping



          A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.



          Renice the Blender process(es)



          If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness value will give it low priority, so that other application programs will get priority to use the CPU and RAM).



          The command line tool renicecan manage the niceness between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo for text mode programs and sudo -H for GUI programs) to decrease the niceness. See



          man renice



          Users other than the superuser may only alter the priority of
          processes they own, and can only monotonically increase their
          'nice value' (for security reasons) within the range 0 to 19, unless
          a nice resource limit is set (Linux 2.6.12 and higher). The superuser
          may alter the priority of any process and set the priority to any
          value in the range -20 to 19. Useful priorities are: 19 (the affected
          processes will run only when nothing else in the system wants to), 0
          (the ``base'' scheduling priority), anything negative (to make things
          go very fast).




          It may be more convenient to install and use htop to increase the niceness of your blender process(es),



          sudo apt install htop


          The screenshot shows how I have reniced the htop process itself (from 0) to 5.



          enter image description here




          1. Select process (in your case Blender process)


          2. Renice to a suitable value in the range 0–19


          3. The current niceness is shown in the 'NI' column







          share|improve this answer

































            0














            Have a look at cgexec to limit a processes resource usage, this example may help.



            One option is to start rendering and go to bed, then let it continue while you are out at work/school... Using 20GB to render is pretty high, a better question which you could ask at blender.stackexchange is how to reduce the memory needed to render. Maybe you can bake a high res sculpt to a normal map, use lower res image textures, use render layers to render different parts of your scene separately and composite them together.






            share|improve this answer































              0














              Swap is not a replacement for RAM! Programs eventually run on RAM irrespective of how much swap space you assign. Moreover, using more swap will make the pc dead slow.
              BTW, what are you rendering? Think about optimising your project instead.






              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "89"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f972138%2fassign-program-its-own-swap-drive%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                About swapping



                A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.



                Renice the Blender process(es)



                If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness value will give it low priority, so that other application programs will get priority to use the CPU and RAM).



                The command line tool renicecan manage the niceness between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo for text mode programs and sudo -H for GUI programs) to decrease the niceness. See



                man renice



                Users other than the superuser may only alter the priority of
                processes they own, and can only monotonically increase their
                'nice value' (for security reasons) within the range 0 to 19, unless
                a nice resource limit is set (Linux 2.6.12 and higher). The superuser
                may alter the priority of any process and set the priority to any
                value in the range -20 to 19. Useful priorities are: 19 (the affected
                processes will run only when nothing else in the system wants to), 0
                (the ``base'' scheduling priority), anything negative (to make things
                go very fast).




                It may be more convenient to install and use htop to increase the niceness of your blender process(es),



                sudo apt install htop


                The screenshot shows how I have reniced the htop process itself (from 0) to 5.



                enter image description here




                1. Select process (in your case Blender process)


                2. Renice to a suitable value in the range 0–19


                3. The current niceness is shown in the 'NI' column







                share|improve this answer






























                  2














                  About swapping



                  A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.



                  Renice the Blender process(es)



                  If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness value will give it low priority, so that other application programs will get priority to use the CPU and RAM).



                  The command line tool renicecan manage the niceness between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo for text mode programs and sudo -H for GUI programs) to decrease the niceness. See



                  man renice



                  Users other than the superuser may only alter the priority of
                  processes they own, and can only monotonically increase their
                  'nice value' (for security reasons) within the range 0 to 19, unless
                  a nice resource limit is set (Linux 2.6.12 and higher). The superuser
                  may alter the priority of any process and set the priority to any
                  value in the range -20 to 19. Useful priorities are: 19 (the affected
                  processes will run only when nothing else in the system wants to), 0
                  (the ``base'' scheduling priority), anything negative (to make things
                  go very fast).




                  It may be more convenient to install and use htop to increase the niceness of your blender process(es),



                  sudo apt install htop


                  The screenshot shows how I have reniced the htop process itself (from 0) to 5.



                  enter image description here




                  1. Select process (in your case Blender process)


                  2. Renice to a suitable value in the range 0–19


                  3. The current niceness is shown in the 'NI' column







                  share|improve this answer




























                    2












                    2








                    2







                    About swapping



                    A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.



                    Renice the Blender process(es)



                    If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness value will give it low priority, so that other application programs will get priority to use the CPU and RAM).



                    The command line tool renicecan manage the niceness between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo for text mode programs and sudo -H for GUI programs) to decrease the niceness. See



                    man renice



                    Users other than the superuser may only alter the priority of
                    processes they own, and can only monotonically increase their
                    'nice value' (for security reasons) within the range 0 to 19, unless
                    a nice resource limit is set (Linux 2.6.12 and higher). The superuser
                    may alter the priority of any process and set the priority to any
                    value in the range -20 to 19. Useful priorities are: 19 (the affected
                    processes will run only when nothing else in the system wants to), 0
                    (the ``base'' scheduling priority), anything negative (to make things
                    go very fast).




                    It may be more convenient to install and use htop to increase the niceness of your blender process(es),



                    sudo apt install htop


                    The screenshot shows how I have reniced the htop process itself (from 0) to 5.



                    enter image description here




                    1. Select process (in your case Blender process)


                    2. Renice to a suitable value in the range 0–19


                    3. The current niceness is shown in the 'NI' column







                    share|improve this answer















                    About swapping



                    A USB stick does not work well for swapping. The hardware (memory cells) is slow, and sensitive to wear (the expected lifetime in number of write cycles is low compared to other hardware). An HDD or SSD is better, but if you need fairly fast processing, increased RAM is the solution.



                    Renice the Blender process(es)



                    If you want to use the computer for other tasks while rendering, you can renice Blender (a high niceness value will give it low priority, so that other application programs will get priority to use the CPU and RAM).



                    The command line tool renicecan manage the niceness between -20 and 19, where 19 is the 'nicest' value visavi the other tasks alias lowest priority. You need elevated permissions (use sudo for text mode programs and sudo -H for GUI programs) to decrease the niceness. See



                    man renice



                    Users other than the superuser may only alter the priority of
                    processes they own, and can only monotonically increase their
                    'nice value' (for security reasons) within the range 0 to 19, unless
                    a nice resource limit is set (Linux 2.6.12 and higher). The superuser
                    may alter the priority of any process and set the priority to any
                    value in the range -20 to 19. Useful priorities are: 19 (the affected
                    processes will run only when nothing else in the system wants to), 0
                    (the ``base'' scheduling priority), anything negative (to make things
                    go very fast).




                    It may be more convenient to install and use htop to increase the niceness of your blender process(es),



                    sudo apt install htop


                    The screenshot shows how I have reniced the htop process itself (from 0) to 5.



                    enter image description here




                    1. Select process (in your case Blender process)


                    2. Renice to a suitable value in the range 0–19


                    3. The current niceness is shown in the 'NI' column








                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 14 '18 at 21:37









                    David Foerster

                    28.3k1365111




                    28.3k1365111










                    answered Nov 3 '17 at 8:57









                    sudodussudodus

                    24.8k32877




                    24.8k32877

























                        0














                        Have a look at cgexec to limit a processes resource usage, this example may help.



                        One option is to start rendering and go to bed, then let it continue while you are out at work/school... Using 20GB to render is pretty high, a better question which you could ask at blender.stackexchange is how to reduce the memory needed to render. Maybe you can bake a high res sculpt to a normal map, use lower res image textures, use render layers to render different parts of your scene separately and composite them together.






                        share|improve this answer




























                          0














                          Have a look at cgexec to limit a processes resource usage, this example may help.



                          One option is to start rendering and go to bed, then let it continue while you are out at work/school... Using 20GB to render is pretty high, a better question which you could ask at blender.stackexchange is how to reduce the memory needed to render. Maybe you can bake a high res sculpt to a normal map, use lower res image textures, use render layers to render different parts of your scene separately and composite them together.






                          share|improve this answer


























                            0












                            0








                            0







                            Have a look at cgexec to limit a processes resource usage, this example may help.



                            One option is to start rendering and go to bed, then let it continue while you are out at work/school... Using 20GB to render is pretty high, a better question which you could ask at blender.stackexchange is how to reduce the memory needed to render. Maybe you can bake a high res sculpt to a normal map, use lower res image textures, use render layers to render different parts of your scene separately and composite them together.






                            share|improve this answer













                            Have a look at cgexec to limit a processes resource usage, this example may help.



                            One option is to start rendering and go to bed, then let it continue while you are out at work/school... Using 20GB to render is pretty high, a better question which you could ask at blender.stackexchange is how to reduce the memory needed to render. Maybe you can bake a high res sculpt to a normal map, use lower res image textures, use render layers to render different parts of your scene separately and composite them together.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 3 '17 at 7:42









                            samblersambler

                            24414




                            24414























                                0














                                Swap is not a replacement for RAM! Programs eventually run on RAM irrespective of how much swap space you assign. Moreover, using more swap will make the pc dead slow.
                                BTW, what are you rendering? Think about optimising your project instead.






                                share|improve this answer




























                                  0














                                  Swap is not a replacement for RAM! Programs eventually run on RAM irrespective of how much swap space you assign. Moreover, using more swap will make the pc dead slow.
                                  BTW, what are you rendering? Think about optimising your project instead.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    Swap is not a replacement for RAM! Programs eventually run on RAM irrespective of how much swap space you assign. Moreover, using more swap will make the pc dead slow.
                                    BTW, what are you rendering? Think about optimising your project instead.






                                    share|improve this answer













                                    Swap is not a replacement for RAM! Programs eventually run on RAM irrespective of how much swap space you assign. Moreover, using more swap will make the pc dead slow.
                                    BTW, what are you rendering? Think about optimising your project instead.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 3 '17 at 11:50









                                    sziraquisziraqui

                                    2402413




                                    2402413






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f972138%2fassign-program-its-own-swap-drive%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                        Mangá

                                        Eduardo VII do Reino Unido