Your question is so broad I can only give a broad answer.
Javascript would not be the best choice IMHO as it executes client-side. You IMPLY you want to slow things down on the server side.
You don't say which web server you're running and therefore which server-side scripting languages are available to you (e.g. php, C# via ASP.NET, etc.), but one thing you might try is figuring that out, then scripting a web page with built-in delays via functions such as the C# and php sleep() methods. This will cause the web server to pause as it generates the page.
Again, because your question is so broad, I can't give a more specific answer. My goal here is to point you toward something you can specifically do on the server side that we KNOW will slow things down.
The understanding here is that you are going to have a client hit the page that has the slowdown calls built in. If you're trying to do something more "nefarious", like simulating a stress test of the server by running it low on memory or CPU, those types of situations can slow down a server too, but are beyond the scope of this answer. You can Google stress testing tools; you'll want to have at least a basic grasp of system monitoring tools for your platform (Windows, Linux, etc.) as well if this is the path you're heading down.