[stgt] tgt memory usage

Raj Singh rajtpd at gmail.com
Fri Jun 28 20:58:36 CEST 2013


Andy,

Thanks for the reply. Yes, I was planning on putting print statements
in to see where in the script it bogs down. I will reply when I have
something solid.

Regards,

Raj

On Wed, Jun 26, 2013 at 3:12 PM, Andy Grover <agrover at redhat.com> wrote:
> On 06/19/2013 12:27 AM, Raj Singh wrote:
>>
>> tgtadm --lld iscsi --mode target --op new --tid=1 --targetname
>> volume-9c2637a7-1c47-41a7-89d3-86dddd8f9082
>>
>> tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b
>> /dev/cinder-volumes/volume-9c2637a7-1c47-41a7-89d3-86dddd8f9082
>>
>>
>> But when I perform the following command I run out of memory after 3 -
>> 4 mins (there are no LUN's or Target's on this machine when I run this
>> command):
>>
>> tgt-admin --update
>> iqn.2010-10.org.openstack:volume-9c2637a7-1c47-41a7-89d3-86dddd8f9082
>>
>>
>>
>> To fix this for now I upped the memory on my server from 2G to 12G.
>> Now when I run the tgt-admin --update command it completes after 8 -
>> 10 mins (during this time the memory consumed by tgt-admin goes to
>> 10G).
>>
>> Not sure if this script should take up this much memory for starting a
>> single lun and target.
>
>
> tgt-admin is a hideous, overgrown Perl script, and it sounds like it's doing
> something really inefficient in your case. How big is your config?
>
> One thing you could do is make a copy of the tgt-admin script, and then
> insert print statements to see exactly where things bog down. Is it slow
> before update_targets? Somewhere in process_accounts?
>
> I'd recommend starting at the very bottom, inserting prints in the "elsif
> ($update ne 0) {" block.
>
> Regards -- Andy
>



-- 
Regards,

-Raj
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list