Score:0

High RAM usage when providing large file on apache

it flag
NON

I'm using Apache 2.4 on AlmaLinux 8. When I publicate a hundreds GB file and if someone starts downloading it, Apache RAM usage (especially VIRT) becomes bigger and bigger, starts swapping and ultimately, boom. Why this happens, and is there any way to prevent this? Thanks.

This is ps:

ps -eF | grep httpd
root         933       1  0 73036  7604   0 07:54 ?        00:00:03 /usr/sbin/httpd -DFOREGROUND
apache      1372     933  0 76259  4552   0 07:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      1373     933  0 76603  5068   1 07:54 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      1374     933 11 866436 63304  0 07:54 ?        01:50:24 /usr/sbin/httpd -DFOREGROUND
apache     12818     933  0 516413 22520  1 10:20 ?        00:01:53 /usr/sbin/httpd -DFOREGROUND

and this is top (filtered by apache):

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1374 apache    20   0 3384.5m  57.2m   6.1m S  14.2   3.9 110:45.56 httpd
   1372 apache    20   0  297.9m   4.4m   3.1m S   0.0   0.3   0:00.00 httpd
   1373 apache    20   0  299.2m   4.9m   3.6m S   0.0   0.3   0:00.57 httpd
  12818 apache    20   0 2017.2m  21.8m   6.8m S   0.0   1.5   1:53.54 httpd

These are after 12 hours of running.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.