varnish performance problems

I was reading a forum post at linked in. and I saw someone having some performance issues at low level server. and I have one server too 4gb ram and 8 core cpu. anyway this is how he solved that problem .connect_timeout = 500s; .first_byte_timeout = 500s; .between_bytes_timeout = 500s; echo ‘fs.file-max=1000000’ >> /etc/sysctl.conf echo ‘net.ipv4.ip_local_port_range = 1024 65535’ >> /etc/sysctl.conf echo ‘* soft nofile 1000000’ >> /etc/security/limits.conf echo ‘* hard nofile 1000000’ >> /etc/security/limits.confecho ‘session required pam_limits.so’ >> /etc/pam.d/loginulimit -n 1000000 and another suggestion was DAEMON_OPTS=”-a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -p thread_pools=8 -p thread_pool_max=2500 -p thread_pool_min=200 -p thread_pool_add_delay=2 -p listen_depth=2048 -p session_linger=100 -p connect_timeout=600 -s malloc,4G” just a personal note if I have any performance problem at varnishd.