Why do I have major fps lags on minecraft?

I don't know why this started happening, it will lower to like 10 fps and raise up again every 5 seconds or so. Here are my specs:

i7 8700k 3.7ghz

1x16gb DDR4 3200mhz RAM

GTX 1080ti

Java 1.8.0_ 51 64 bit

Laptop? Power from battery? AC adapter?
Desktop? Power supply size?
Either one:
Windows version?
Ethernet or wireless network?
Hooked to Internet?
Cooling of CPU and/or GPU? Temp monitor?
Sweeps for malware?
Programs or utilities loaded on power up or in background?
Chat program or game capture running?
Video output settings like resolution, color depth, 3D, etc?
Give details about these or anything else to get some guessing that might be helpful.

I find it interesting that even a strong pc can struggle with minecraft. I think a lot of it has to do with the Java platform as well as the game mechanics where there are ticks per second that time the game's refresh. If you are playing modded minecraft, the machinery can severely lower timing. If it is vanilla minecraft, if too many mobs generate in an area, it will slow you down until you clear that chunk. What minecraft struggles with are any changes within loaded chunks, where if too many changes occur, the game becomes all but unplayable.