LAMP Performance Optimisation Flashcards

(25 cards)

1
Q

What is LAMP performance optimization?

A

LAMP performance optimization enhances the speed and efficiency of Linux, Apache, MySQL, and PHP components.

Optimizing a LAMP stack reduces WordPress page load times, improving user experience and SEO. Freelancers tune performance for client sites, while enterprise architects scale systems for high traffic, aligning with your WordPress performance interests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you monitor Linux resource usage in LAMP?

A

Use top or htop to view CPU, memory, and process usage.

Identifies bottlenecks for WordPress servers. Freelancers monitor resources, while enterprise architects integrate with tools like Prometheus, per your Linux basics deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is vm.swappiness in Linux for LAMP?

A

vm.swappiness controls swap usage, set in /etc/sysctl.conf, like vm.swappiness=10.

Low values prioritize RAM for WordPress performance. Freelancers adjust it, while enterprise architects optimize for high-memory systems, per your performance goals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you optimize Linux file system for LAMP?

A

Use SSDs and enable noatime in /etc/fstab, like noatime for mounts.

Reduces disk I/O for WordPress file access. Freelancers configure storage, while enterprise architects use fast storage solutions, per your Linux basics deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Apache’s KeepAlive directive for LAMP?

A

KeepAlive On allows persistent connections to reduce latency.

Speeds up WordPress page loads. Freelancers enable it in httpd.conf, while enterprise architects tune MaxKeepAliveRequests, per your Apache deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you optimize Apache’s MPM in LAMP?

A

Use the event MPM with a2enmod mpm_event and tune threads in /etc/apache2/mods-available/mpm_event.conf.

Handles high WordPress traffic efficiently. Freelancers configure MPM, while enterprise architects scale threads, per your Apache configuration knowledge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is mod_expires in Apache for LAMP?

A

mod_expires sets cache expiration headers, like ExpiresByType text/css “access plus 1 month”.

Caches WordPress assets. Freelancers enable it, while enterprise architects optimize cache durations, per your WordPress performance deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you enable compression in Apache for LAMP?

A

Enable mod_deflate with a2enmod deflate and configure AddOutputFilterByType DEFLATE text/html.

Reduces WordPress page size. Freelancers compress assets, while enterprise architects fine-tune compression, per your performance interests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you optimize MySQL queries in LAMP?

A

Use EXPLAIN to analyze queries and add indexes, like CREATE INDEX idx_post_status ON wp_posts(post_status);.

Speeds up WordPress database access. Freelancers optimize queries, while enterprise architects scale indexes, per your MySQL deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the innodb_buffer_pool_size in MySQL?

A

innodb_buffer_pool_size sets memory for data caching, like innodb_buffer_pool_size=512M in my.cnf.

Improves WordPress query performance. Freelancers adjust it, while enterprise architects allocate memory for large databases, per your MySQL deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you enable MySQL query cache in LAMP?

A

Set query_cache_type=1 and query_cache_size=32M in /etc/mysql/my.cnf.

Caches WordPress query results. Freelancers enable caching, while enterprise architects use it selectively, per your performance goals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you optimize PHP in LAMP?

A

Enable opcache in php.ini with opcache.enable=1 and increase memory_limit to 256M.

Speeds up WordPress PHP execution. Freelancers tune settings, while enterprise architects optimize for high loads, per your PHP core concepts deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is PHP’s opcache in LAMP?

A

opcache caches compiled PHP bytecode, like opcache.revalidate_freq=0.

Reduces WordPress processing time. Freelancers enable it, while enterprise architects fine-tune cache settings, per your WordPress performance deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you use a Content Delivery Network (CDN) in LAMP?

A

Configure a CDN (e.g., Cloudflare) to serve WordPress static assets and update wp-config.php for CDN URLs.

Offloads traffic. Freelancers set up CDNs, while enterprise architects integrate with global CDNs, per your performance deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is memcached in LAMP?

A

memcached is an in-memory caching system, installed with sudo apt install memcached.

Caches WordPress data. Freelancers use plugins like W3 Total Cache, while enterprise architects scale caching, per your performance interests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you enable memcached for WordPress in LAMP?

A

Install php-memcached, configure memcached in /etc/memcached.conf, and use a plugin like Memcached Object Cache.

Speeds up WordPress. Freelancers configure caching, while enterprise architects optimize cache distribution, per your PHP core concepts deck.

17
Q

How do you optimize Apache logs in LAMP?

A

Rotate logs with logrotate and disable unnecessary logging in httpd.conf.

Reduces WordPress server overhead. Freelancers manage logs, while enterprise architects automate rotation, per your Apache deck.

18
Q

How do you troubleshoot slow WordPress in LAMP?

A

Check logs (/var/log/apache2/error.log), use EXPLAIN for MySQL, and monitor with top.

Identifies WordPress bottlenecks. Freelancers debug issues, while enterprise architects use monitoring tools, per your error handling deck.

19
Q

What is HTTP/2 in LAMP?

A

HTTP/2 improves performance with multiplexing, enabled in Apache with a2enmod http2.

Speeds up WordPress asset delivery. Freelancers enable HTTP/2, while enterprise architects ensure SSL compatibility, per your Apache deck.

20
Q

How do you optimize WordPress database in LAMP?

A

Run OPTIMIZE TABLE wp_posts; and clean transients with plugins like WP-Optimize.

Reduces WordPress database size. Freelancers optimize tables, while enterprise architects automate maintenance, per your MySQL deck.

21
Q

How do you scale Apache for high traffic in LAMP?

A

Use mpm_event, tune MaxRequestWorkers, and enable load balancing.

Handles WordPress traffic spikes. Freelancers configure workers, while enterprise architects implement clustering, per your Apache knowledge.

22
Q

How do you optimize Linux swap in LAMP?

A

Increase swap space with fallocate and set vm.swappiness=10 in /etc/sysctl.conf.

Manages WordPress memory under load. Freelancers adjust swap, while enterprise architects optimize for performance, per your Linux basics deck.

23
Q

What is query caching in WordPress on LAMP?

A

Query caching stores database results, enabled with plugins like Query Monitor or memcached.

Reduces WordPress query load. Freelancers implement caching, while enterprise architects scale cache systems, per your performance deck.

24
Q

How do you use Varnish in LAMP?

A

Install Varnish, configure it to cache HTTP responses, and set Apache to listen on a different port (e.g., 8080).

Caches WordPress pages. Freelancers use Varnish for speed, while enterprise architects configure reverse proxies, per your performance goals.

25
How do you monitor LAMP performance for WordPress?
Use htop for Linux, tail -f /var/log/apache2/access.log, and plugins like New Relic for WordPress. Tracks WordPress performance. Freelancers optimize client sites, while enterprise architects integrate with monitoring suites, per your Linux and debugging decks.