How should i set this configuration? Depending on the memory?
And then is it necessary to perform a benchmarking test?
I've set it to 'shared_buffers = 12288' with 8 GB RAM on postgresql 7.4.9, FreeBSD 6.0. There is no exact size, depends on type of workload, server-OS etc. Adjust it up and down and see if your performance changes.
regards
Claus