What settings for my.conf can help me to consume less CPU and lesse memory?

I am having problems with high cpu and high memory consumptions with mysqld.

Thank you