文件系统与Postgres的图像

编程入门 行业动态 更新时间:2024-10-19 21:42:02
本文介绍了文件系统与Postgres的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好, 我在网络门户网站上工作。有一些广告。我们有大约20万 的广告。每个广告都有自己的名为ID的目录,其中有5个子目录 ,各种大小的5张图片。 文件系统太慢了。但是我不知道,如果我将这些图像存储到后期,那么性能会越来越高。 第二个问题是,我需要什么样的硬件用于存储在DB中。现在 我有Intel(R)Pentium(R)4 CPU 1.70GHz,512MB RAM和120GB HDD。 thanx for advice ... 味噌 --------------------------- (播出结束)--------------------------- 提示7:别忘了增加你的免费空间地图设置

Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem is too slow. But I don''t know, if I store these images into postgres, performace will grow. Second question is, what kind of hardware I need for storing in DB. Now I have Intel(R) Pentium(R) 4 CPU 1.70GHz with 512MB RAM and 120GB HDD. thanx for advices... miso ---------------------------(end of broadcast)--------------------------- TIP 7: don''t forget to increase your free space map settings

推荐答案

你好, 文件系统太慢了。但我不知道,如果我将这些图像存储到后期,性能将会增长。 但postres还将其数据存储在文件系统上。 可能需要更好的FS,比如XFS(xfs非常好并且表现良好), imho其他文件系统如reiser有一些版本问题;) 因此将图像存储在postres中作为blob imho并不像XFS那么快,但 也许你必须做一些性能测试。 也许你可以用路径和 文件名存储图像的索引表 - 如果没有到目前为止,这应该加快你的速度文件搜索。 也有很多内存,至少1Gb这样一个大门户,而scsi 是个好主意,如果你想提升它采用带有 scsi-raid和大量内存的双proz系统 - 并且还要花很多钱:(( 另一个提示是激活代理或httpd-cache和压缩或其他 缓存php,java等内容。 抱歉我的英语不好。 volker Michal Hlavac写道: 你好, 我在网络门户网站上工作。有一些广告。我们有大约20万个广告。每个广告都有自己的名为ID的目录,其中有5个子目录,各种大小的5个图像。 文件系统太慢了。但我不知道,如果我将这些图像存储到postgres中,性能会增长。 第二个问题是,我需要什么样的硬件才能存储在DB中。现在我有Intel(R)Pentium(R)4 CPU 1.70GHz,512MB RAM和120GB HDD。 建议...... 味噌< ---------------------------(广播结束)----------- ---------------- 提示7:别忘了增加免费空间地图设置 Filesystem is too slow. But I don''t know, if I store these images intopostgres, performace will grow. but postres also stores its data on the filesystem. maybe take a better FS like XFS (xfs is very nice and performes good), imho other filesystems like reiser have some version-problems ;) so storing images in postres as blob imho is not as fast as XFS, but maybe you have to do some performance tests. maybe you can store an index table for your images with path and filenames - if did not so far, this should speed up your file-search. also having a lot of ram, at least 1Gb for such a big portal, and scsi is a good idea, if you want to boost it up, take a dual proz system with scsi-raid and a lot of ram - and costs a lot of money also :((. another tip is to activate proxy or httpd-cache and compression or other caching stuff in php, java etc. sorry for my broken english. volker Michal Hlavac wrote: Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem is too slow. But I don''t know, if I store these images into postgres, performace will grow. Second question is, what kind of hardware I need for storing in DB. Now I have Intel(R) Pentium(R) 4 CPU 1.70GHz with 512MB RAM and 120GB HDD. thanx for advices... miso ---------------------------(end of broadcast)--------------------------- TIP 7: don''t forget to increase your free space map settings

---------------------------(广播结束)----------------- ---------- 提示4:不要杀死-9''邮政局长

---------------------------(end of broadcast)--------------------------- TIP 4: Don''t ''kill -9'' the postmaster

----- BEGIN PGP签名消息----- 哈希:SHA1 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, imho其他文件系统如reiser有一些版本问题;) imho other filesystems like reiser have some version-problems ;)

哦,请。 Reiser和postgres一样不稳定 - 换句话说,两者都必须遭受偏见,而这种偏见曾经是真实的。 ;-) 如果是大型目录,ext2 / 3表现极差(如原版 帖子)那么这个家伙会更好但是ext2 / 3。这就是为什么我将b $ b从ext2切换到2年前的reiser(之后没有任何问题)。 Mit freundlichem Gru? /亲切的问候 Holger Klawitter - - 列出< at> klawitter< dot> de $ / $ -----开始PGP SIGNATURE ----- 版本:GnuPG v1.2.2(GNU / Linux) iD8DBQFAe8dP1Xdt0HKSwgYRAkLqAJ4vmqkDGkFYDL67aPMAK6 qGAavEQgCfekvV JCht52XAoXE8DrbXX24B8gc = = XjOz ----- END PGP SIGNATURE ----- ---------------------------(播出结束)-------------- ------------- 提示2:您可以使用取消注册命令立即取消所有列表 (发送取消注册YourEmailAddressHere ; ma*******@postgresql )

Oh please. Reiser is as unstable as postgres is slow - in other words, both have to suffer prejudice which used to be true loooong ago. ;-) In cases of large directories ext2/3 perform extremely bad (as in the original post) So this guy will be better off with anything but ext2/3. That''s why I switched from ext2 to reiser ~2 years ago (without any problems since). Mit freundlichem Gru? / With kind regards Holger Klawitter - -- lists <at> klawitter <dot> de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAe8dP1Xdt0HKSwgYRAkLqAJ4vmqkDGkFYDL67aPMAK6 qGAavEQgCfekvV JCht52XAoXE8DrbXX24B8gc= =XjOz -----END PGP SIGNATURE----- ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to ma*******@postgresql)

On Tue,2004-04-13 at 01:44,Michal Hlavac写道: On Tue, 2004-04-13 at 01:44, Michal Hlavac wrote: 你好, 我在网络门户网站上工作。有一些广告。我们有大约20万个广告。每个广告都有自己的名为ID的目录,其中有5个子目录,各种大小的5个图像。 文件系统太慢了。但我不知道,如果我将这些图像存储到postgres中,性能将会增长。 Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem is too slow. But I don''t know, if I store these images into postgres, performace will grow.

考虑打破你的目录,即: / ads /(ID%1000)/ ID 我将它用于拥有数百万张图像的系统,效果很好。我确实不认为把它们放在数据库中就可以做任何事情 对你有利。 :) ---------------------------(播出结束) --------------------------- 提示3:如果通过Usenet发布/阅读,请发送相应的 subscribe-nomail命令 ma*******@postgresql 所以您的 消息可以干净地通过邮件列表

Consider breaking your directories up, i.e.: /ads/(ID % 1000)/ID I use that for a system with several million images, works great. I really don''t think putting them in the database will do anything positive for you. :) ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to ma*******@postgresql so that your message can get through to the mailing list cleanly

更多推荐

文件系统与Postgres的图像

本文发布于:2023-05-28 06:56:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/315120.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件系统   图像   Postgres

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!