Name : perl-Thread-Needs
| |
Version : 0.06
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 18:57:39
|
Group : Development/Libraries/Perl
| Source RPM : perl-Thread-Needs-0.06-lp155.1.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : remove unneeded modules from CLONEd memory
|
Description :
*** A note of CAUTION ***
This module only functions on Perl versions 5.8.0 and later. And then only when threads are enabled with -Dusethreads. It is of no use with any version of Perl before 5.8.0 or without threads enabled.
*************************
In many threaded applications, threads do only very simple things that do not need many (if any) modules. The current threading model however, copies all modules that are available at the moment a thread is started, to the memory of the thread (ensuring an identical environment to the thread from which it was started). Memory that is not being used and which is not being shared between processes. In other words, pretty much wasted memory.
The \'Thread::Needs\' module is an *experimental* module for reducing the memory footprint of threaded Perl applications. It attempts to reduce the amount of memory used by removing *all* modules, *except* the ones it is told to keep, from memory in any threads that are started from the thread in which \'Thread::Needs\' is invoked.
Please note that this module uses some dirty tricks that may crash your application, specifically with segmentation faults. A segmentation fault is usually an indication that a module got removed when it shouldn\'t have been. But usually, you will just get an error when a thread starts (or is already running for a while) indicating the absence of a particular module. In that case, you just need to add the name of the module to the list of modules that you need to keep. Beware though that this can be a process that takes a number of iterations, as one module may be using other modules that you are not aware of and which are needed anyway.
Memory savings are greatly dependent on the number and type of modules that have been \'use\'d when a threads is started. It naturally also depends on the number of threads that are started. Observer memory savings have ranged from 1% (with only a few modules and only 1 thread) upto more than 25% (with 100 threads and some modules), effectively making the difference between having a server go into swap or not on my development machine. Your Mileage May Vary.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.5/noarch |