LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2013, 08:07 AM   #1
systemlordanubis
Member
 
Registered: Jun 2010
Distribution: Debian, Ubuntu, Win
Posts: 143

Rep: Reputation: 16
IPC::Cache working very slow


Hi All,

In several perl scripts I have, I'm using IPC::Cache to share a list of MAC addresses between processes as well as some operational flags (4 flags of 0 or 1).

The problem is that over the last week or so, the access calls to 'set' or 'get' values from the IPC::Cache object are very slow.

I don't know the internals behind IPC::Cache, but I'm wondering what could be causing it to be slow.

Does one process reading or writing to the cache object lock/block all others until it's finished?

Is there something else (other than file system) I could use to replace IPC::Cache?

Thanks
Anubis.
 
Old 06-11-2013, 08:28 AM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I'm not familiar with that package (or with perl,) but my guess is that the buffer is full and a process is trying to clear it by sending the data over the network. The slowness of "set" is probably because of that, whereas the slowness of "get" could be caused by the process retaining the lock until the data is transmitted successfully. An alternate theory is that the buffer is being expanded by allocating a new buffer and copying the old data into it. This is a better question for the maintainer, however.

This is actually a good opportunity to strengthen your open-source skills. If you think it's something that's caused by the package and not by your code, you can try to track down the problem and fix it in the package's source. It really makes you think about things analytically, and it's rewarding to be able to fix something you previously thought you had no control over.

Kevin Barry
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] i5-3550 PCs painfully slow; disk cache usage differences educateme Linux - Hardware 4 07-26-2012 11:44 AM
Iterating through IPC::Cache systemlordanubis Programming 1 07-28-2011 01:18 AM
slow arp cache refresh dorian33 Linux - Networking 2 12-02-2009 11:26 AM
Squid: one site too slow, cache problem also cooljai Linux - Server 4 08-25-2009 04:04 AM
Measuring Instuction per cycle ,cache miss, IPC sanjay_smg Linux - Software 0 01-16-2008 07:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration