2009年6月7日星期日

[PerlChina] Re: 多进程并行处理多文件,使用共享内存

预编译下,速度不是一般的快啊
-------
twitter : http://twitter.com/smallfish_xy
blog    : http://hi.baidu.com/smallfish_xy


2009/6/8 xsir317 <xsir317@163.com>
一般来说只要你不把文件全读进内存,perl可以处理非常大的文件,而且速度是挺不错的。
 
这个时候就要注意正则的效率了。
 
2009-06-08


发件人: 梁舒华
发送时间: 2009-06-08  12:33:47
收件人: perlchina
抄送:
主题: [PerlChina] Re: 多进程并行处理多文件,使用共享内存
我也去看一下。perlchina真的很好,perlchina里的成员更加nice..


2009/6/6 Michael Zeng <galaxy2004@gmail.com>
多大的文件啊, perl处理 500M 左右的文件 都是可以的
 
加上硬件现在这么强大 
 


 
2009/6/6 Qiang (James) <shijialee@gmail.com>
Gene wrote:
> 需求:有一批文件待处理,每个文件都比较大。需要筛选有用的数据到文件。
>
> 实现:想用多进程实现,主进程按文件数平均分配给10个子进程处理;子进程筛选需要的行PUSH到共享内存的数组里。处理完毕最终打印数组数据到文
> 件。
>
> 对perl的多进程和共享内存不是很了解。请大家帮忙提供下程序框架,谢谢~
>

使用 fork, 每个进程处理一个文件,不清楚你用共享内存做什么,处理完后的行
可以再做单独处理。

fork 教程看这里
http://wiki.perlchina.org/Doing_many_things%2C_like_pings

Qiang(James)


--
           Yours Sincerely
                   Zeng Hong






--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 多进程并行处理多文件,使用共享内存

一般来说只要你不把文件全读进内存,perl可以处理非常大的文件,而且速度是挺不错的。
 
这个时候就要注意正则的效率了。
 
2009-06-08


发件人: 梁舒华
发送时间: 2009-06-08  12:33:47
收件人: perlchina
抄送:
主题: [PerlChina] Re: 多进程并行处理多文件,使用共享内存
我也去看一下。perlchina真的很好,perlchina里的成员更加nice..


2009/6/6 Michael Zeng <galaxy2004@gmail.com>
多大的文件啊, perl处理 500M 左右的文件 都是可以的
 
加上硬件现在这么强大 
 


 
2009/6/6 Qiang (James) <shijialee@gmail.com>
Gene wrote:
> 需求:有一批文件待处理,每个文件都比较大。需要筛选有用的数据到文件。
>
> 实现:想用多进程实现,主进程按文件数平均分配给10个子进程处理;子进程筛选需要的行PUSH到共享内存的数组里。处理完毕最终打印数组数据到文
> 件。
>
> 对perl的多进程和共享内存不是很了解。请大家帮忙提供下程序框架,谢谢~
>

使用 fork, 每个进程处理一个文件,不清楚你用共享内存做什么,处理完后的行
可以再做单独处理。

fork 教程看这里
http://wiki.perlchina.org/Doing_many_things%2C_like_pings

Qiang(James)


--
           Yours Sincerely
                   Zeng Hong



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 多进程并行处理多文件,使用共享内存

我也去看一下。perlchina真的很好,perlchina里的成员更加nice..


2009/6/6 Michael Zeng <galaxy2004@gmail.com>
多大的文件啊, perl处理 500M 左右的文件 都是可以的
 
加上硬件现在这么强大 
 


 
2009/6/6 Qiang (James) <shijialee@gmail.com>
Gene wrote:
> 需求:有一批文件待处理,每个文件都比较大。需要筛选有用的数据到文件。
>
> 实现:想用多进程实现,主进程按文件数平均分配给10个子进程处理;子进程筛选需要的行PUSH到共享内存的数组里。处理完毕最终打印数组数据到文
> 件。
>
> 对perl的多进程和共享内存不是很了解。请大家帮忙提供下程序框架,谢谢~
>

使用 fork, 每个进程处理一个文件,不清楚你用共享内存做什么,处理完后的行
可以再做单独处理。

fork 教程看这里
http://wiki.perlchina.org/Doing_many_things%2C_like_pings

Qiang(James)


--
           Yours Sincerely
                   Zeng Hong




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Mason公司招聘信息。

Hello,

I am the HR manager of an Internet company in Chengdu. We need full-time or part-time talented programmers with great experiences. Would you like to join our company or recommend your friends to us? We will pay you referral fee (2000 RMB/person).

Mason LLC was founded in Silicon Valley in 2001 and its branch office was opened in Chengdu in 2002. It is dedicated to the development and operation of C2C websites. We have more than 100 servers in the US.
All our customers are from US, EU and other developed countries. We currently have staff from six countries, including U.S., China, Canada, Ukraine.

The requirements for the candidates:

* More than 5 years related working experience.
* Have deep understanding for OOP. Have experience of big website development. The ones who are familiar with Perl, Php can enjoy the priority.
* Have certain ability of English reading, writing and communication. English is the main writing language(e.g. English will be used in project management, program annotation and the weekly online meeting which the foreign engineers will also attend).
* Be familiar with one of the following technologies or tools: ORACLE / MYSQL, JavaScript / JQuery, XML / HTML / CSS, Subversion.
* Be familiar with big website distributed cluster/colony/the high performance expanding of the IT construction.
* The design of server cluster which has more than 5, 000, 000 PV.

If the candidate is not in Chengdu, we will pay the round-trip airline tickets. The interview can be arranged to take place during weekends.

Cathy


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 突然找到了这个东东

囧。打不开那我真的没办法了。。。
 
 
2009-06-08


发件人: aiping ding
发送时间: 2009-06-08  08:39:16
收件人: perlchina
抄送:
主题: [PerlChina] Re: 突然找到了这个东东
在公司下载下来还是打不开!!!

2009/6/6 aipingding520 <aipingding520@gmail.com>
 
恩可以了
昨天不行
 
2009-06-06

aipingding520

发件人: 梁舒华
发送时间: 2009-06-05  09:01:22
收件人: perlchina
抄送:
主题: [PerlChina] Re: 突然找到了这个东东
可以下载啊

2009/6/5 aipingding520 <aipingding520@gmail.com>
你好啊,能不能把书给我发一份我我从论坛下下来打不开
谢谢啊
 
2009-06-05

aipingding520

发件人: xsir317
发送时间: 2009-06-04  17:27:41
抄送:
主题: [PerlChina] 突然找到了这个东东
在自己的硬盘上突然发现了这个东东。。。应该是大骆驼吧。。。
 
因为压缩起来不到1M,而且居然是中文版的CHM,所以就分享一下。。。
 
不记得从哪里下载下来的了。。。。放着都没看。。。愧疚ing
 
另有英文版: 
 
* OReilly.Perl.Cookbook.pdf
 
* OReilly.Perl.and.LWP.chm
 
* Advanced Perl programming - O'Reilly.pdf
 
* OReilly.Perl.Best.Practices.Jul.2005.chm
 
甚至我还找到了2本D语言的PDF文档,什么时候出现在我硬盘上的已经不可考了。。。
 
唉。。。继续羞耻ing。。。
 
 
2009-06-04

xsir317




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 突然找到了这个东东

在公司下载下来还是打不开!!!

2009/6/6 aipingding520 <aipingding520@gmail.com>
 
恩可以了
昨天不行
 
2009-06-06

aipingding520

发件人: 梁舒华
发送时间: 2009-06-05  09:01:22
收件人: perlchina
抄送:
主题: [PerlChina] Re: 突然找到了这个东东
可以下载啊

2009/6/5 aipingding520 <aipingding520@gmail.com>
你好啊,能不能把书给我发一份我我从论坛下下来打不开
谢谢啊
 
2009-06-05

aipingding520

发件人: xsir317
发送时间: 2009-06-04  17:27:41
抄送:
主题: [PerlChina] 突然找到了这个东东
在自己的硬盘上突然发现了这个东东。。。应该是大骆驼吧。。。
 
因为压缩起来不到1M,而且居然是中文版的CHM,所以就分享一下。。。
 
不记得从哪里下载下来的了。。。。放着都没看。。。愧疚ing
 
另有英文版: 
 
* OReilly.Perl.Cookbook.pdf
 
* OReilly.Perl.and.LWP.chm
 
* Advanced Perl programming - O'Reilly.pdf
 
* OReilly.Perl.Best.Practices.Jul.2005.chm
 
甚至我还找到了2本D语言的PDF文档,什么时候出现在我硬盘上的已经不可考了。。。
 
唉。。。继续羞耻ing。。。
 
 
2009-06-04

xsir317





--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 请教高手,perl有没有类似php函数ob_flush();flush();这二个的perl函数!!

设置了autoflush 好像没什么效果,呵呵.

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---