Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you permanently set sequential cutoff values? #1624

Open
miversen33 opened this issue Mar 16, 2025 · 2 comments
Open

How do you permanently set sequential cutoff values? #1624

miversen33 opened this issue Mar 16, 2025 · 2 comments
Labels
question Further information is requested

Comments

@miversen33
Copy link

miversen33 commented Mar 16, 2025

Question

I have recently started exploring OpenCAS and so far I am very impressed with it. I am coming from configuration/testing hell with bcache and so OpenCAS is a breath of fresh air!

That said, while configuration for opencas is much better than bcache, it does have some quirks that I am unsure about.

As an example, how would I go about saving the following casadm command to my opencas.conf?

# casadm --set-param --name seq-cutoff --promotion-count 4 --cache-id 1 --core-id 1
# casadm --set-param --name seq-cutoff --promotion-count 4 --cache-id 1 --core-id 3

I took a look at the source for loading the configuration (I believe this is where that happens?)

        def validate_parameter(self, param_name, param_value):
            if param_name == 'ioclass_file':
                if not os.path.exists(param_value):
                    raise ValueError('Invalid path to io_class file')
            elif param_name == 'cleaning_policy':
                self.check_cleaning_policy_valid(param_value)
            elif param_name == 'promotion_policy':
                self.check_promotion_policy_valid(param_value)
            elif param_name == 'cache_line_size':
                self.check_cache_line_size_valid(param_value)
            elif param_name == "lazy_startup":
                self.check_lazy_startup_valid(param_value)
            elif param_name == "target_failover_state":
                self.check_failover_state_valid(param_value)
            else:
                raise ValueError(f'{param_name} is invalid parameter name')

And that is pretty clearly ensuring that there is no way for me to set things like seq-cutoff (or the promotion threshold). Am I missing something or is the configuration limited on what it can apply?

@miversen33 miversen33 added the question Further information is requested label Mar 16, 2025
@robertbaldyga
Copy link
Member

Hi @miversen33 ! You are right, seq-cutoff seems to be missing in the config file.
In general that should not be a big deal, as cache saves those settings in metadata on the cache drive when they are changed. So when you seq-cutoff params with casadm command and then stop the cache, on the next start (with --load) your configuration will be restored.

As for availability of those options in opencas.conf, I think the key here is that nobody before asked for it. The project development is more or less driven by the user needs, so that may be the moment we add it to our todo list.

@miversen33
Copy link
Author

miversen33 commented Mar 17, 2025

That makes sense. So can we consider this issue a request for that? Or maybe we close this issue in favor of #1625 and have all configurable options added to the configuration?

After all the documentation very clearly states you should be using /etc/opencas.conf instead of using casadm, yet we are expected to use casadm to configure things because not all configuration options are available in /etc/opencas.conf

While configuration of Open CAS Linux via the opencas.conf file is highly recommended, the following sections detail how to manually configure Open CAS Linux options using casadm. For more details on available commands for the casadm utility, see the section Configuration Tool Details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants