cancel
Showing results for 
Search instead for 
Did you mean: 

Mounted Magento2 directory with EFS

Mounted Magento2 directory with EFS

Dear Support,

 

We have mounted Magento2 directory (/var/www/html ) with AWS EFS, and when we tried to execute chmod and rm command from the mounting point it takes too long and up normal, could you please let me know the reason.

 

Thanks

 

Regards,

Mohammed

 

11 REPLIES 11

Re: Mounted Magento2 directory with EFS

Hi @syed_mohammed,

 

These two commands are relative to the server and not to the Magento framework. Have you checked the logs of your server?

Re: Mounted Magento2 directory with EFS

Hi,

 

Have you checked the logs of your server?

No, I'm unable to find.

Is there any way to check the delay logs?

 

Regards,

Moahammed

Re: Mounted Magento2 directory with EFS

@syed_mohammed,

Take a look at the forums about the server on which your Magento instance is installed to find out how to parse the server logs.
There are several performance monitoring tools for the servers, but possibly your server is logging various server crashes to the log files, which may be generating all this delay to complete the commands you have entered.

Re: Mounted Magento2 directory with EFS

It's well known EFS won't work for mounting all the files.  It's only good for sharing media across instances.

Re: Mounted Magento2 directory with EFS

Hi,

 

Thank you for your response

It's only good for sharing media across instances.

Can you please elaborate more? My concern is shared store for all the Instance

 

Regards,

Mohammed

Re: Mounted Magento2 directory with EFS

I strongly advise not to share the whole /var/www/html directory via NFS/EFS: it's a big performance bottleneck.

Magento 2 code is made by A LOT of small files, this could be the reason for you slow "chown -R".

If you share the whole /var/www/html/, every web visitor will require a lot of NFS/EFS calls/read for every php file (with a lot of include).

On a "big" ecommerce, i've made the transition from a setup like yours, to a setup where every server got all the code on locale disk and share ONLY some directories via NFS/EFS, i shared only the directory that needs to be shared: this give the ecommerce a big performance improvement.

I shared via EFS/NFS only pub/static, pub/media and some small directories on var/.

The only downside of this enviroment is that, for every deployment you need to synchronize every server's /var/www/html except for the shared directory, but that's not a big problem if you automatize the deployment via something like deployer, manual rsync or other CD tool.

Re: Mounted Magento2 directory with EFS

EFS is just too slow for you to mount the whole /var/www/html/.

Like it was already said, EFS will be fine for media and logs as well. But ideally you would move logs somewhere else like Sumologic or other solution so you don't have to get logs from the server itself.

If you have multiple servers you can leave Magento on local disk as it will be much faster and just mount media and log folders.

Re: Mounted Magento2 directory with EFS

which directories did you share in var?

Re: Mounted Magento2 directory with EFS

pub/media

pub/static

var/import* (if present)