guest2013-1
guest
- Joined
- Aug 22, 2003
- Messages
- 19,800
- Reaction score
- 13
I'm running a server with NGINX and phpfpm (PHP 5.3.3) and I have a small text file (150kb) with several categories I read from to populate 50 fields randomly when visiting a web page.
Since MySQL would be overkill (in my opinion, if you have a reason why I should have MySQL for a couple of hundred categories that gets random reads, go for it)...
I was wondering if NGINX (or PHP) is smart enough to keep the txt file I open up (with fopen) to read from, open in memory. So far disk read's have been minimal compared to the disk writes I have (mostly to the access log's i assume) and I receive several thousand impressions daily.
I haven't noticed any slow downs in server performance at all. But since I'm going to add another dimension into my web application, also using a small .txt file (since they don't need to be updated/inserted to, just read)... this question popped into my head. Does NGINX/PHP keep this file in memory for faster access... or read the disc each time?
Since MySQL would be overkill (in my opinion, if you have a reason why I should have MySQL for a couple of hundred categories that gets random reads, go for it)...
I was wondering if NGINX (or PHP) is smart enough to keep the txt file I open up (with fopen) to read from, open in memory. So far disk read's have been minimal compared to the disk writes I have (mostly to the access log's i assume) and I receive several thousand impressions daily.
I haven't noticed any slow downs in server performance at all. But since I'm going to add another dimension into my web application, also using a small .txt file (since they don't need to be updated/inserted to, just read)... this question popped into my head. Does NGINX/PHP keep this file in memory for faster access... or read the disc each time?
Last edited: