Respected Monks,
An upcoming release (MCE::Shared 1.826) continues forward with regards to decreasing memory consumption. In doing so, I took out all the code pertaining to condvar, handle, and queue from inside MCE/Shared/Server.pm and re-factored the bits into MCE/Shared/Condvar.pm, Handle.pm, and Queue.pm respectively. Furthermore, I enabled AUTOLOAD inside MCE/Shared.pm and moved all the sugar-type functions inside it.
For testing, the following script loads the relevant modules and constructs a shared queue.
use strict; use warnings; use Prima qw( Application Buttons Label ); #use Parallel::ForkManager; #use MCE; #use MCE::Loop; use MCE::Hobo; use MCE::Shared; my $que = MCE::Shared->queue(); #busy loop, review top at OS level, press Ctrl-C to exit for ( 1 .. 2e9 ) { 1 }
Results reported by top (resident memory size):
20.7 Mib Prima + Parallel::ForkManager + MCE::Shared->queue v1.824 20.9 Mib Prima + Parallel::ForkManager + MCE::Shared->queue v1.825 20.7 Mib Prima + Parallel::ForkManager + MCE::Shared->queue v1.826 21.2 Mib Prima + MCE::Loop + MCE::Shared->queue v1.824 20.4 Mib Prima + MCE::Loop + MCE::Shared->queue v1.825 19.3 Mib Prima + MCE::Loop + MCE::Shared->queue v1.826 21.1 Mib Prima + MCE Core API + MCE::Shared->queue v1.824 20.4 Mib Prima + MCE Core API + MCE::Shared->queue v1.825 19.1 Mib Prima + MCE Core API + MCE::Shared->queue v1.826 18.8 Mib Prima + MCE::Hobo + MCE::Shared->queue v1.824 19.1 Mib Prima + MCE::Hobo + MCE::Shared->queue v1.825 18.4 Mib Prima + MCE::Hobo + MCE::Shared->queue v1.826 14.7 Mib Prima (only) 8.4 Mib Parallel::ForkManager + MCE::Shared v1.826 7.1 Mib MCE::Loop + MCE::Shared v1.826 6.8 Mib MCE Core API + MCE::Shared v1.826 6.1 Mib MCE::Hobo + MCE::Shared v1.826
Q. Why is memory footprint important for MCE::Hobo?
A. I have an add-on module using MCE::Hobo to send-recv data, similar to Parallel::Fork::BossWorkerAsync. Someone has requested this for a long time and decided okay will do it. But first, wanted to reduce memory consumption.
MCE::Shared 1.826 will be released sometimes this week.
Regards, Mario
In reply to Re: Prima + MCE::Hobo demonstration
by marioroy
in thread Prima + MCE::Hobo demonstration
by marioroy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |