{
    return $qmail{ConcurrencyRemote} if defined $qmail{ConcurrencyRemote};

    my $concurrencyRemote = 20;

    open(MEMINFO, "/proc/meminfo") || die "Couldn't read meminfo: $!";

    my $line;

    while ( $line = <MEMINFO> )
    {
	if ( $line =~ /^MemTotal:\s+(\d+)\s+/ )
	{
	    my $memTotal = $1;

	    if ( $memTotal <= 16384 )
	    {
		$concurrencyRemote = 2;
 	    }
	    elsif ( $memTotal <= 32768 )
	    {
		$concurrencyRemote = 4;
 	    }
	    else 
	    {
		$concurrencyRemote = 20;
 	    }

	    last;
        }
    }

    $concurrencyRemote;
}
