If I have 2 ips ip1: ns1 and ip2: ns2, Do I have to replace 10.0.0.40 for the ip1?. If I have 1018MB of ram, would you recommend me to use -m 1018 or less than 1018MB?. Thank you.
That's up to you. Use the IP address that you want memcache to listen on. I'd use less; how much depends on how much the system is in use (current load average, etc.).