It’s bound to happen: Visitors will try to access URLs on your website that no longer exist, prompting them to see a “HTTP 404 Not Found” page.
Processing a 404 message can hamper website performance; it will use even more memory if the page contains links and files.
We’d like to lessen the burden on your server. This article offers two methods to quicken the process and get a 404 page to the visitor a lot faster, using a lot less memory.
The first method is to adjust your Drupal 7 core settings. Option two is better: activate the Fast 404 module.
Select the method that works best for you: you'll increase your 404 webpage's display speed and lessening your website's workload.
The article you want, again, is Using Fast 404 in Drupal.
For more helpful articles, visit the Acquia Help Center.