Coder Social home page Coder Social logo

Comments (8)

pete4abw avatar pete4abw commented on July 17, 2024

Just use lrzip -p# to restrain CPUs. lrzip is a standalone monolithic program that manages its own environment.

from lrzip.

mgorny avatar mgorny commented on July 17, 2024

That doesn't help when you can't control what options are passed to lrzip, i.e. when it's run implicitly by libarchive.

from lrzip.

pete4abw avatar pete4abw commented on July 17, 2024

News to me. libarchive data formats.

lrzip no longer has a library interface. If you use tar -I 'lrzip -options...' -cf file.tar.lrz you can pass any options you want. Even with lrztar`. Again, lrzip is best applied as a standalone program. Anything else...YMMV.

I certainly would not take time for this. Patches always encouraged.

from lrzip.

mgorny avatar mgorny commented on July 17, 2024

It supports it via calling lrzip executable (https://github.com/search?q=repo%3Alibarchive%2Flibarchive%20lrzip&type=code).

from lrzip.

pete4abw avatar pete4abw commented on July 17, 2024

It supports it via calling lrzip executable (https://github.com/search?q=repo%3Alibarchive%2Flibarchive%20lrzip&type=code).

Then the issue will be with libarchive to allow for parameters. You do, however, point out a deficiency in the lrzip.conf file. It does not have a parameter for setting the number of CPUs, the -p# option. Were there such an option, such as:

PROCESSORS = ##

lrzip/lrzip-next will force that on the program (subject to command line override). As I no longer contribute to lrzip, I will look at this possibility in my own fork. Good luck.

from lrzip.

pete4abw avatar pete4abw commented on July 17, 2024

@mgorny
This will help. I implemented this separately. Just add the line PROCESSORS = ## to your lrzip.conf file. I never understood why more people do not use it!

$ git diff util.c
diff --git a/util.c b/util.c
index f643303..c17f35e 100644
--- a/util.c
+++ b/util.c
@@ -265,6 +265,12 @@ bool read_config(rzip_control *control)
                        /* default is yes */
                        if (isparameter(parametervalue, "no"))
                                control->flags &= ~FLAG_THRESHOLD;
+               } else if (isparameter(parameter, "processors")) {
+                       control->threads = atoi(parametervalue);
+                       if (control->threads < 1) {
+                               print_err("CONF.FILE error. PROCESSORS value must be >= 1. Resetting to default. %d\n", PROCESSORS);
+                               control->threads = PROCESSORS;
+                       }
                } else if (isparameter(parameter, "hashcheck")) {
                        if (isparameter(parametervalue, "yes")) {
                                control->flags |= FLAG_CHECK;

from lrzip.

mgorny avatar mgorny commented on July 17, 2024

Thanks, but I don't think we're going to patch lrzip locally in Gentoo. Given the state of the project, perhaps a better option would be to remove it from Gentoo entirely.

from lrzip.

ckolivas avatar ckolivas commented on July 17, 2024

Unfortunately threatening me will not magically give me more time to work on this project. If you wish to remove it from your distribution based on this use case that is entirely your prerogative. The project is sorely lacking in people who understand the code well enough to contribute only bug fixes to address outstanding issues, as most are interested in adding features instead. I will eventually get around to addressing known issues as I do at infrequent intervals but that is likely still months away.
Whilst Peter's patch will give you the ability to control processors in the configuration file and is a worthwhile addition in its own right, it does not address your issue.
Patches are always welcome.

from lrzip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.