Extreme lag and I don't know why.

Hi I was wondering if there is something I can do to fix the issue with me wifi. Everytime I join the server I have about 30 ping and this is after I boot up my pc. Now about 6 minutes into the game I will start getting a lot of lag to where my ping spikes to 800 ping every 10 seconds and if I restart my pc and log back in my ping is back down to 30 ping for another 6 minutes and then I start lagging again. Is there anything I can do to fix this or run a test on my pc to see what is going on? Thanks