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

Sen2Agri Processors installation must not modify some system files #10

Open
savmickael opened this issue Nov 21, 2017 · 7 comments
Open

Comments

@savmickael
Copy link
Contributor

In the CMakeLists.txt file of sen2agri-processors two system files ( /usr/lib/tmpfiles.d and /etc/security/limits.d) are modified during configuration of the project. It is not well adapted to do that here, it should be done during the installation of the system.
Can you please move it to the right place.

@lnicola
Copy link
Contributor

lnicola commented Nov 21, 2017

Just trying to understand this, are you saying that the files are installed during CMake configuration (i.e. when running cmake path/to/processors, or that they shouldn't be installed by the resulting package? I don't think it's the former.

As for the latter, I guess we could move them to the sen2agri-app package. Would that work for you?

@savmickael
Copy link
Contributor Author

With the current version when I made a

make install

after configuration and build, it try to install these files in system paths.
For me these files must not be installed by the package sen2agri_processors. I don't know the role of sen2agri-app package.
Why you need to modify these system files ?

@lnicola
Copy link
Contributor

lnicola commented Nov 21, 2017

Got it. The sen2agri-app package contains the orchestrator and other applications used in the automated mode.

The two changes are:

  1. Disabling transparent hugepages; during production we've noticed considerable slowdowns caused by this feature and a cursory Google search shows other similar reports. It might be possible to tune the THP defragmentation, but we haven't looked into it.

  2. Increasing the open file limit. This is required by the L4 processors because they tend to read a lot of input images at the same time. The default 1024/4096 file descriptor limit is not sufficient for larger sites.

@lnicola
Copy link
Contributor

lnicola commented Nov 21, 2017

Anyway, if you're setting CMAKE_INSTALL_PREFIX to something different than / or /usr, I don't expect these files to cause permission denied errors.

@savmickael
Copy link
Contributor Author

I agree with the last comments. Set the CMAKE_INSTALL_PREFIX hide the issue. However I am not convinced that the sen2agri-processors should change these system properties.
I should be a set of prerequesite made by administrator and put in a README file.
I understand that second point is related to processors but for the second I didn't understand if it is related to the processors. Honestly, I didn't understand the patch can you explain me more precisely.

@lnicola
Copy link
Contributor

lnicola commented Nov 22, 2017

I understand that second point is related to processors but for the second I didn't understand if it is related to the processors.

I assume you meant to say that the first point is unclear, so I'll follow up on that explanation. Linux usually manages physical memory in 4 KB pages, but accounting for each of these pages consumes a bit of memory and time, and people with large systems (10s of GBs up to TBs of RAM, I assume) didn't like it.

This is how "huge pages" came to be, which are pages of 2 MB instead of 4 KB. Linux also has a feature where it continuously goes through the used memory and tries to defragment it and merge consecutive 4 KB pages into 2 MB ones, which is called "transparent hugepages" (THP).

This process in the background, but is sometimes detrimental for performance, either because the pages can't be merged, or because they get merged only to get split back again.

On our systems I noticed that the THP defrag process was consuming a lot of CPU time (although I don't recall the numbers) and slowing down the processing. Many other projects recommend disabling them, for example:

At that time the simplest solution was to ship that file which disables THP unless requested by the applications. But I agree that it's not necessarily the Sen2Agri system's concern, so we should probably remove it, and leave that decision up to the users. But of course, the same argument applies to the other change (increasing the open file limit).

@savmickael
Copy link
Contributor Author

It should be done during installation of the system and document somewhere in the SUM not in the CMakeLists.txt file.
Thanks a lot for the explanation.

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

No branches or pull requests

2 participants