Josip Gracin wrote:
Hello!

Could somebody please explain the following bad performance of a machine running ZFS. I have a feeling it has something to with the way ZFS uses memory, because I've checked with ::kmastat and it shows that ZFS uses huge amounts of memory which I think is killing the performance of the machine.

This is the test program:

#include <malloc.h>
#include <stdio.h>

int main()
{
        char *buf = calloc(512000000,1);
        if ( buf == NULL ) {
                printf("Allocation failed.\n");
        }
        return 0;
}


I've run the test program on the following two different machines, both under light load:

Machine A is AMD64 3000+ (2.0GHz),   1GB   RAM running snv_46.
                                    -----
Machine B is Pentium4,    2.4GHz,   512MB  RAM running Linux.


Execution times on several consecutive runs are:

Machine A
------------
time ./a.out
./a.out  0.49s user 1.39s system 2% cpu 1:03.25 total
./a.out  0.48s user 1.28s system 3% cpu 50.691 total
./a.out  0.48s user 1.27s system 4% cpu 38.225 total
./a.out  0.48s user 1.24s system 5% cpu 30.694 total
./a.out  0.47s user 1.20s system 5% cpu 28.640 total
./a.out  0.47s user 1.23s system 6% cpu 28.210 total
./a.out  0.47s user 1.21s system 6% cpu 27.700 total
./a.out  0.47s user 1.19s system 9% cpu 17.875 total
./a.out  0.46s user 1.15s system 12% cpu 12.784 total

On machine B
------------
[the first run took approx. 10 seconds, I forgot to paste it]
./a.out  0.14s user 0.89s system 27% cpu 3.711 total
./a.out  0.13s user 0.87s system 25% cpu 3.926 total
./a.out  0.11s user 0.90s system 29% cpu 3.456 total
./a.out  0.11s user 0.91s system 29% cpu 3.435 total
./a.out  0.10s user 0.91s system 38% cpu 2.597 total
./a.out  0.11s user 0.93s system 35% cpu 2.913 total

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

There are several things going on here, and part of that may well be
the memory utilization of ZFS.  Have you tried the same experiment
when not using ZFS?


Keep in mind that Solaris doesn't always use the most efficient
strategies for paging applications... this is something we're actively
working on fixing as part of the VM work going on...

-Bart

--
Bart Smaalders                  Solaris Kernel Performance
[EMAIL PROTECTED]               http://blogs.sun.com/barts
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to