I ran the python version of this demo on a computer with 50 processors, and 250 GB ram, then These are the results for (512,512):
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 1 python3 demo_singular-poisson.py
Time: 1.55
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 2 python3 demo_singular-poisson.py
Time: 1.53
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 3 python3 demo_singular-poisson.py
Time: 1.10
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 4 python3 demo_singular-poisson.py
Time: 0.77
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 5 python3 demo_singular-poisson.py
Time: 0.64
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 6 python3 demo_singular-poisson.py
Time: 0.60
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 7 python3 demo_singular-poisson.py
Time: 0.57
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 8 python3 demo_singular-poisson.py
Time: 0.41
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 9 python3 demo_singular-poisson.py
Time: 0.43
Another thing to note is that the solve time is not very large, with quite a lot of variability of you run the code multiple times. (i used the quay.io/fenicsproject/dev:latest docker image).
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 1 python3 demo_singular-poisson.py
Time: 1.55
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 1 python3 demo_singular-poisson.py
Time: 1.59
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 1 python3 demo_singular-poisson.py
Time: 1.58
fenics@1316788ba4f3:/home/shared/dolfin/python/demo/documented/singular-poisson$ mpirun -n 1 python3 demo_singular-poisson.py
Time: 1.62
A lot of what you might observe on your own system is that other usage of your processors are interfering with the performance of fenics.