[CentOS] lots of small files in a folder on Linux centos

Mon Jul 25 15:37:42 UTC 2011
Lamar Owen <lowen at pari.edu>

On Sunday, July 24, 2011 05:29:23 AM yonatan pingle wrote:
...
> lately the server is under-preforming and load averages are high,
> mysql service keeps crashing and the server is hitting max memory
> usage ( so i added ram .. ) ,
> after looking into the website folders, i have found one folder which
> from my point of view is one of the causes for the server loads.
...
> uploads]# ls | wc -l
> 3123
...
> pros vs cons of having a large amount of small files in the same
> folder on Linux Centos?

3,123 files is not a large number.  From a CentOS 4 file server here.....

[root at pachyderm sky_data]# ls|wc -l
13526
[root at pachyderm sky_data]# cd ../motse
[root at pachyderm motse]# ls |wc -l
28218
[root at pachyderm motse]#cd
[root at pachyderm ~]# du -s /var/lib/pgsql
556420596       /var/lib/pgsql
[root at pachyderm ~]# 

(Yeah, 556GB in PostgreSQL....)  Pachyderm = 'The elephant never forgets....' But I'm not looking forward to converting it to a post-C4 PostgreSQL....

Performance on this box is pretty good, all things considered.

Large log files I have found can be performance problems; check to make sure log files are being rolled properly.

There are some specific MySQL tuning documents out there; I seem to remember a posting on a local LUG list about some serious MySQL performance issues that took a long time to ferret out, but I can't seem to find it quickly.....